LibAwsCompression
Documentation for LibAwsCompression.
LibAwsCompression.AWS_C_COMPRESSION_PACKAGE_IDLibAwsCompression.aws_compression_errorLibAwsCompression.aws_huffman_codeLibAwsCompression.aws_huffman_decoderLibAwsCompression.aws_huffman_encoderLibAwsCompression.aws_huffman_symbol_coderLibAwsCompression.aws_huffman_symbol_decoder_fnLibAwsCompression.aws_huffman_symbol_encoder_fnLibAwsCompression.aws_compression_library_clean_upLibAwsCompression.aws_compression_library_initLibAwsCompression.aws_huffman_decodeLibAwsCompression.aws_huffman_decoder_allow_growthLibAwsCompression.aws_huffman_decoder_initLibAwsCompression.aws_huffman_decoder_resetLibAwsCompression.aws_huffman_encodeLibAwsCompression.aws_huffman_encoder_initLibAwsCompression.aws_huffman_encoder_resetLibAwsCompression.aws_huffman_get_encoded_length
LibAwsCompression.AWS_C_COMPRESSION_PACKAGE_ID — Constant
Documentation not found.
LibAwsCompression.aws_compression_error — Type
aws_compression_errorDocumentation not found.
LibAwsCompression.aws_huffman_code — Type
aws_huffman_codeRepresents an encoded code
LibAwsCompression.aws_huffman_decoder — Type
aws_huffman_decoderStructure used for persistent decoding. Allows for reading from or writing to incomplete buffers.
LibAwsCompression.aws_huffman_encoder — Type
aws_huffman_encoderStructure used for persistent encoding. Allows for reading from or writing to incomplete buffers.
LibAwsCompression.aws_huffman_symbol_coder — Type
aws_huffman_symbol_coderStructure used to define how symbols are encoded and decoded
LibAwsCompression.aws_huffman_symbol_decoder_fn — Type
Function used to decode a code into a symbol
Arguments
bits:[in] The bits to attempt 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 — Type
Function 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 — Method
aws_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 — Method
aws_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 — Method
aws_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 decoding 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 — Method
aws_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 — Method
aws_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 — Method
aws_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 — Method
aws_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 — Method
aws_huffman_encoder_init(encoder, coder)Initialize an 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 — Method
aws_huffman_encoder_reset(encoder)Resets an encoder for use with a new binary stream
Prototype
void aws_huffman_encoder_reset(struct aws_huffman_encoder *encoder);LibAwsCompression.aws_huffman_get_encoded_length — Method
aws_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);