35class wxCompressedFFileInputStream :
public wxInputStream {
37 wxCompressedFFileInputStream(
const wxString &fileName);
38 virtual ~wxCompressedFFileInputStream();
40 virtual bool IsOk()
const {
41 return wxStreamBase::IsOk() && m_file->IsOpened();
43 bool IsSeekable()
const {
return false; }
46 size_t OnSysRead(
void *buffer,
size_t size);
47 wxFileOffset OnSysSeek(wxFileOffset pos, wxSeekMode mode);
48 wxFileOffset OnSysTell()
const;
56 uint8_t inbuf[BUFSIZ];
58 wxDECLARE_NO_COPY_CLASS(wxCompressedFFileInputStream);
62class ChartDataNonSeekableInputStream :
public wxInputStream {
64 ChartDataNonSeekableInputStream(
const wxString &fileName);
65 virtual ~ChartDataNonSeekableInputStream();
67 virtual bool IsOk()
const {
return m_stream->IsOk(); }
68 bool IsSeekable()
const {
return false; }
71 size_t OnSysRead(
void *buffer,
size_t size);
72 wxFileOffset OnSysSeek(wxFileOffset pos, wxSeekMode mode);
73 wxFileOffset OnSysTell()
const;
76 wxInputStream *m_stream;
78 wxDECLARE_NO_COPY_CLASS(ChartDataNonSeekableInputStream);
83class ChartDataInputStream :
public wxInputStream {
85 ChartDataInputStream(
const wxString &fileName);
86 virtual ~ChartDataInputStream();
88 virtual bool IsOk()
const {
return m_stream->IsOk(); }
89 bool IsSeekable()
const {
return m_stream->IsSeekable(); }
91 wxString TempFileName()
const {
return m_tempfilename; }
94 size_t OnSysRead(
void *buffer,
size_t size);
95 wxFileOffset OnSysSeek(wxFileOffset pos, wxSeekMode mode);
96 wxFileOffset OnSysTell()
const;
99 wxString m_tempfilename;
100 wxInputStream *m_stream;
102 wxDECLARE_NO_COPY_CLASS(ChartDataInputStream);
107typedef wxFFileInputStream ChartDataInputStream;
108typedef wxFFileInputStream ChartDataNonSeekableInputStream;
112bool DecompressXZFile(
const wxString &input_path,
const wxString &output_path);