29 #ifndef FILE_ACCESS_COMPRESSED_H 30 #define FILE_ACCESS_COMPRESSED_H 32 #include "io/compression.h" 33 #include "os/file_access.h" 37 Compression::Mode cmode;
41 int write_buffer_size;
44 mutable bool read_eof;
54 mutable int read_block;
56 mutable int read_block_size;
69 void configure(
const String& p_magic, Compression::Mode p_mode=Compression::MODE_FASTLZ,
int p_block_size=4096);
73 virtual Error
_open(
const String& p_path,
int p_mode_flags);
77 virtual void seek(
size_t p_position);
78 virtual void seek_end(int64_t p_position=0);
84 virtual uint8_t
get_8()
const;
85 virtual int get_buffer(uint8_t *p_dst,
int p_length)
const;
89 virtual void store_8(uint8_t p_dest);
93 virtual uint64_t _get_modified_time(
const String& p_file);
101 #endif // FILE_ACCESS_COMPRESSED_H virtual void seek_end(int64_t p_position=0)
seek from the end of file
Definition: file_access_compressed.cpp:240
virtual bool is_open() const
true when file is open
Definition: file_access_compressed.cpp:203
virtual void seek(size_t p_position)
seek to a given position
Definition: file_access_compressed.cpp:208
virtual void close()
close a file
Definition: file_access_compressed.cpp:147
Definition: file_access_compressed.h:35
virtual uint8_t get_8() const
get a byte
Definition: file_access_compressed.cpp:287
virtual size_t get_len() const
get size of the file
Definition: file_access_compressed.cpp:266
virtual int get_buffer(uint8_t *p_dst, int p_length) const
get an array of bytes
Definition: file_access_compressed.cpp:320
virtual void store_8(uint8_t p_dest)
store a byte
Definition: file_access_compressed.cpp:367
virtual size_t get_pos() const
get position in the file
Definition: file_access_compressed.cpp:254
virtual bool file_exists(const String &p_name)
return true if a file exists
Definition: file_access_compressed.cpp:377
virtual bool eof_reached() const
reading passed EOF
Definition: file_access_compressed.cpp:277
virtual Error _open(const String &p_path, int p_mode_flags)
open a file
Definition: file_access_compressed.cpp:99
virtual Error get_error() const
get last error
Definition: file_access_compressed.cpp:362
Definition: file_access.h:40