LibAwsCompression
Documentation for LibAwsCompression.
LibAwsCompression.AWS_C_COMPRESSION_PACKAGE_ID
LibAwsCompression.aws_compression_error
LibAwsCompression.aws_huffman_code
LibAwsCompression.aws_huffman_decoder
LibAwsCompression.aws_huffman_encoder
LibAwsCompression.aws_huffman_symbol_coder
LibAwsCompression.aws_huffman_symbol_decoder_fn
LibAwsCompression.aws_huffman_symbol_encoder_fn
LibAwsCompression.aws_compression_library_clean_up
LibAwsCompression.aws_compression_library_init
LibAwsCompression.aws_huffman_decode
LibAwsCompression.aws_huffman_decoder_allow_growth
LibAwsCompression.aws_huffman_decoder_init
LibAwsCompression.aws_huffman_decoder_reset
LibAwsCompression.aws_huffman_encode
LibAwsCompression.aws_huffman_encoder_init
LibAwsCompression.aws_huffman_encoder_reset
LibAwsCompression.aws_huffman_get_encoded_length
LibAwsCompression.AWS_C_COMPRESSION_PACKAGE_ID
— ConstantDocumentation not found.
LibAwsCompression.aws_compression_error
— Typeaws_compression_error
Documentation not found.
LibAwsCompression.aws_huffman_code
— Typeaws_huffman_code
Represents an encoded code
LibAwsCompression.aws_huffman_decoder
— Typeaws_huffman_decoder
Structure used for persistent decoding. Allows for reading from or writing to incomplete buffers.
LibAwsCompression.aws_huffman_encoder
— Typeaws_huffman_encoder
Structure used for persistent encoding. Allows for reading from or writing to incomplete buffers.
LibAwsCompression.aws_huffman_symbol_coder
— Typeaws_huffman_symbol_coder
Structure used to define how symbols are encoded and decoded
LibAwsCompression.aws_huffman_symbol_decoder_fn
— TypeFunction used to decode a code into a symbol
Arguments
bits
:[in] The bits to attept to decode a symbol fromsymbol
:[out] The symbol found. Do not write to if no valid symbol founduserdata
:[in] Optional userdata (aws_huffman_symbol_coder
.userdata)
Returns
The number of bits read from bits
LibAwsCompression.aws_huffman_symbol_encoder_fn
— TypeFunction used to encode a single symbol to an aws_huffman_code
Arguments
symbol
:[in] The symbol to encodeuserdata
:[in] Optional userdata (aws_huffman_symbol_coder
.userdata)
Returns
The code representing the symbol. If this symbol is not recognized, return a code with num_bits set to 0.
LibAwsCompression.aws_compression_library_clean_up
— Methodaws_compression_library_clean_up()
Clean up internal datastructures used by aws-c-compression. Must not be called until application is done using functionality in aws-c-compression.
Prototype
void aws_compression_library_clean_up(void);
LibAwsCompression.aws_compression_library_init
— Methodaws_compression_library_init(alloc)
Initializes internal datastructures used by aws-c-compression. Must be called before using any functionality in aws-c-compression.
Prototype
void aws_compression_library_init(struct aws_allocator *alloc);
LibAwsCompression.aws_huffman_decode
— Methodaws_huffman_decode(decoder, to_decode, output)
Decodes a byte buffer into the provided symbol array.
Arguments
decoder
:[in] The decoder object to useto_decode
:[in] The encoded byte buffer to read fromoutput
:[in] The buffer to write decoded symbols to. If decoder is set to allow growth, capacity will be increased when necessary.
Returns
AWS_OP_SUCCESS if encoding is successful, AWS_OP_ERR otherwise
Prototype
int aws_huffman_decode( struct aws_huffman_decoder *decoder, struct aws_byte_cursor *to_decode, struct aws_byte_buf *output);
LibAwsCompression.aws_huffman_decoder_allow_growth
— Methodaws_huffman_decoder_allow_growth(decoder, allow_growth)
Set whether or not to increase capacity when the output buffer fills up while decoding. This is false by default.
Prototype
void aws_huffman_decoder_allow_growth(struct aws_huffman_decoder *decoder, bool allow_growth);
LibAwsCompression.aws_huffman_decoder_init
— Methodaws_huffman_decoder_init(decoder, coder)
Initialize a decoder object with a symbol coder.
Prototype
void aws_huffman_decoder_init(struct aws_huffman_decoder *decoder, struct aws_huffman_symbol_coder *coder);
LibAwsCompression.aws_huffman_decoder_reset
— Methodaws_huffman_decoder_reset(decoder)
Resets a decoder for use with a new binary stream
Prototype
void aws_huffman_decoder_reset(struct aws_huffman_decoder *decoder);
LibAwsCompression.aws_huffman_encode
— Methodaws_huffman_encode(encoder, to_encode, output)
Encode a symbol buffer into the output buffer.
Arguments
encoder
:[in] The encoder object to useto_encode
:[in] The symbol buffer to encodeoutput
:[in] The buffer to write encoded bytes to
Returns
AWS_OP_SUCCESS if encoding is successful, AWS_OP_ERR otherwise
Prototype
int aws_huffman_encode( struct aws_huffman_encoder *encoder, struct aws_byte_cursor *to_encode, struct aws_byte_buf *output);
LibAwsCompression.aws_huffman_encoder_init
— Methodaws_huffman_encoder_init(encoder, coder)
Initialize a encoder object with a symbol coder.
Prototype
void aws_huffman_encoder_init(struct aws_huffman_encoder *encoder, struct aws_huffman_symbol_coder *coder);
LibAwsCompression.aws_huffman_encoder_reset
— Methodaws_huffman_encoder_reset(encoder)
Resets a decoder for use with a new binary stream
Prototype
void aws_huffman_encoder_reset(struct aws_huffman_encoder *encoder);
LibAwsCompression.aws_huffman_get_encoded_length
— Methodaws_huffman_get_encoded_length(encoder, to_encode)
Get the byte length of to_encode post-encoding.
Arguments
encoder
:[in] The encoder object to useto_encode
:[in] The symbol buffer to encode
Returns
The length of the encoded string.
Prototype
size_t aws_huffman_get_encoded_length(struct aws_huffman_encoder *encoder, struct aws_byte_cursor to_encode);