#include <Compressor.h>
Inherited by AZ::IO::CompressorZLib, and AZ::IO::CompressorZStd.
Public Types | |
| typedef AZ::u64 | SizeType |
Public Member Functions | |
| virtual | ~Compressor () |
| When we open a stream to check if it's compressed we read the first m_maxHeaderSize bytes. | |
| virtual AZ::u32 | GetTypeId () const =0 |
| Return compressor type id. | |
| virtual bool | ReadHeaderAndData (CompressorStream *stream, AZ::u8 *data, unsigned int dataSize)=0 |
| Called when we open a stream to Read for the first time. Data contains the first. dataSize <= m_maxHeaderSize. | |
| virtual bool | WriteHeaderAndData (CompressorStream *stream) |
| Called when we are about to start writing to a compressed stream. (Must be called first to write compressor header) | |
| virtual SizeType | Read (CompressorStream *stream, SizeType byteSize, SizeType offset, void *buffer)=0 |
| Forwarded function from the Device when we from a compressed stream. | |
| virtual SizeType | Write (CompressorStream *stream, SizeType byteSize, const void *data, SizeType offset=SizeType(-1))=0 |
| Forwarded function from the Device when we write to a compressed stream. | |
| virtual bool | WriteSeekPoint (CompressorStream *stream) |
| Write a seek point. | |
| virtual bool | StartCompressor (CompressorStream *stream, int compressionLevel, SizeType autoSeekDataSize) |
| Initializes Compressor for writing data. | |
| virtual bool | Close (CompressorStream *stream)=0 |
| Called just before we close the stream. All compression data will be flushed and finalized. (You can't add data afterwards). | |
Static Public Attributes | |
| static const int | m_maxHeaderSize = 4096 |
Compressor/Decompressor base interface. Used for all stream compressors.
|
pure virtual |
Called just before we close the stream. All compression data will be flushed and finalized. (You can't add data afterwards).
Implemented in AZ::IO::CompressorZLib, and AZ::IO::CompressorZStd.
Return compressor type id.
Implemented in AZ::IO::CompressorZLib, and AZ::IO::CompressorZStd.
|
pure virtual |
Forwarded function from the Device when we from a compressed stream.
Implemented in AZ::IO::CompressorZLib, and AZ::IO::CompressorZStd.
|
pure virtual |
Called when we open a stream to Read for the first time. Data contains the first. dataSize <= m_maxHeaderSize.
Implemented in AZ::IO::CompressorZLib, and AZ::IO::CompressorZStd.
|
inlinevirtual |
Initializes Compressor for writing data.
Reimplemented in AZ::IO::CompressorZLib, and AZ::IO::CompressorZStd.
|
pure virtual |
Forwarded function from the Device when we write to a compressed stream.
Implemented in AZ::IO::CompressorZLib, and AZ::IO::CompressorZStd.
|
virtual |
Called when we are about to start writing to a compressed stream. (Must be called first to write compressor header)
Reimplemented in AZ::IO::CompressorZLib, and AZ::IO::CompressorZStd.
|
inlinevirtual |
Write a seek point.
Reimplemented in AZ::IO::CompressorZLib, and AZ::IO::CompressorZStd.