Open 3D Engine Compression Gem API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
Compression::ICompressionInterface Struct Referenceabstract

Inherited by CompressionLZ4::CompressorLZ4.

Public Member Functions

virtual CompressionAlgorithmId GetCompressionAlgorithmId () const =0
 Retrieves the 32-bit compression algorithm ID associated with this interface.
 
virtual AZStd::string_view GetCompressionAlgorithmName () const =0
 Human readable name associated with the compression algorithm.
 
virtual CompressionResultData CompressBlock (AZStd::span< AZStd::byte > compressionBuffer, const AZStd::span< const AZStd::byte > &uncompressedData, const CompressionOptions &compressionOptions={}) const =0
 
virtual size_t CompressBound (size_t uncompressedBufferSize) const =0
 

Member Function Documentation

◆ CompressBlock()

virtual CompressionResultData Compression::ICompressionInterface::CompressBlock ( AZStd::span< AZStd::byte >  compressionBuffer,
const AZStd::span< const AZStd::byte > &  uncompressedData,
const CompressionOptions compressionOptions = {} 
) const
pure virtual

Compresses the uncompressed data into the compressed buffer

Parameters
compressedBufferdestination buffer where compressed output will be stored to
uncompressedDatasource buffer containing uncompressed content
compressOptionsthat can be provided to the Compressor
Returns
a CompressionResultData instance to indicate if compression operation has succeeded

Implemented in CompressionLZ4::CompressorLZ4.

◆ CompressBound()

virtual size_t Compression::ICompressionInterface::CompressBound ( size_t  uncompressedBufferSize) const
pure virtual

Returns the upper bound on compressed size given the uncompressed buffer size Can be used to allocate a destination buffer that can fit the compressed content

Parameters
uncompressedBufferSizesize of uncompressed data
Returns
worst case(upper bound) size that is needed to store compressed data for a given uncompressed size

Implemented in CompressionLZ4::CompressorLZ4.

◆ GetCompressionAlgorithmId()

virtual CompressionAlgorithmId Compression::ICompressionInterface::GetCompressionAlgorithmId ( ) const
pure virtual

Retrieves the 32-bit compression algorithm ID associated with this interface.

Implemented in CompressionLZ4::CompressorLZ4.

◆ GetCompressionAlgorithmName()

virtual AZStd::string_view Compression::ICompressionInterface::GetCompressionAlgorithmName ( ) const
pure virtual

Human readable name associated with the compression algorithm.

Implemented in CompressionLZ4::CompressorLZ4.


The documentation for this struct was generated from the following file: