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.
CompressionLZ4::CompressorLZ4 Class Reference

Inherits Compression::ICompressionInterface.

Public Member Functions

Compression::CompressionAlgorithmId GetCompressionAlgorithmId () const override
 Retrieves the 32-bit compression algorithm ID associated with this interface.
 
AZStd::string_view GetCompressionAlgorithmName () const override
 Retrieves the human readable associated with the LZ4 compressor.
 
Compression::CompressionResultData CompressBlock (AZStd::span< AZStd::byte > compressionBuffer, const AZStd::span< const AZStd::byte > &uncompressedData, const Compression::CompressionOptions &compressionOptions={}) const override
 
size_t CompressBound (size_t uncompressedBufferSize) const override
 
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()

Compression::CompressionResultData CompressionLZ4::CompressorLZ4::CompressBlock ( AZStd::span< AZStd::byte >  compressionBuffer,
const AZStd::span< const AZStd::byte > &  uncompressedData,
const Compression::CompressionOptions compressionOptions = {} 
) const
overridevirtual

Compresses the uncompressed data into the compressed buffer

Returns
a CompressionResultData instance to indicate if compression operation has succeeded

Implements Compression::ICompressionInterface.

◆ CompressBound()

size_t CompressionLZ4::CompressorLZ4::CompressBound ( size_t  uncompressedBufferSize) const
overridevirtual

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

Implements Compression::ICompressionInterface.

◆ GetCompressionAlgorithmId()

Compression::CompressionAlgorithmId CompressionLZ4::CompressorLZ4::GetCompressionAlgorithmId ( ) const
overridevirtual

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

Implements Compression::ICompressionInterface.

◆ GetCompressionAlgorithmName()

AZStd::string_view CompressionLZ4::CompressorLZ4::GetCompressionAlgorithmName ( ) const
overridevirtual

Retrieves the human readable associated with the LZ4 compressor.

Implements Compression::ICompressionInterface.


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