ゴミ箱
Namespaces | Classes | Typedefs | Enumerations | Functions
boost::beast::zlib Namespace Reference

Namespaces

 detail
 

Classes

class  deflate_stream
 
class  inflate_stream
 
struct  z_params
 

Typedefs

typedef unsigned char Byte
 
typedef unsigned int uInt
 

Enumerations

enum  error {
  error::need_buffers = 1, error::end_of_stream, error::stream_error, error::invalid_block_type,
  error::invalid_stored_length, error::too_many_symbols, error::invalid_code_lenths, error::invalid_bit_length_repeat,
  error::missing_eob, error::invalid_literal_length, error::invalid_distance_code, error::invalid_distance,
  error::over_subscribed_length, error::incomplete_length_set, error::general
}
 
enum  z_Type { Z_BINARY = 0, Z_TEXT = 1, Z_UNKNOWN = 2 }
 
enum  Flush {
  Flush::none, Flush::block, Flush::partial, Flush::sync,
  Flush::full, Flush::finish, Flush::trees
}
 
enum  z_Compression { Z_NO_COMPRESSION = 0, Z_BEST_SPEED = 1, Z_BEST_COMPRESSION = 9, Z_DEFAULT_COMPRESSION = -1 }
 
enum  Strategy {
  Strategy::normal, Strategy::filtered, Strategy::huffman, Strategy::rle,
  Strategy::fixed
}
 

Functions

std::size_t deflate_upper_bound (std::size_t bytes)
 
error_code make_error_code (error ev)
 

Typedef Documentation

typedef unsigned char boost::beast::zlib::Byte
typedef unsigned int boost::beast::zlib::uInt

Enumeration Type Documentation

Error codes returned by the codec.

Enumerator
need_buffers 

Additional buffers are required.

This error indicates that one or both of the buffers
provided buffers do not have sufficient available bytes
to make forward progress.

This does not always indicate a failure condition.

@note This is the same as `Z_BUF_ERROR` returned by ZLib.
end_of_stream 

End of stream reached.

@note This is the same as `Z_STREAM_END` returned by ZLib.
stream_error 

Invalid stream or parameters.

This error is returned when invalid parameters are passed,
or the operation being performed is not consistent with the
state of the stream. For example, attempting to write data
when the end of stream is already reached.

@note This is the same as `Z_STREAM_ERROR` returned by ZLib.
invalid_block_type 

Invalid block type.

invalid_stored_length 

Invalid stored block length.

too_many_symbols 

Too many length or distance symbols.

invalid_code_lenths 

Invalid code lengths.

invalid_bit_length_repeat 

Invalid bit length repeat.

missing_eob 

Missing end of block code.

invalid_literal_length 

Invalid literal/length code.

invalid_distance_code 

Invalid distance code.

invalid_distance 

Invalid distance too far back.

over_subscribed_length 

Over-subscribed length code.

incomplete_length_set 

Incomplete length set.

general 

general error

Flush option.

Enumerator
none 
block 
partial 
sync 
full 
finish 
trees 

Compression strategy.

These are used when compressing streams.

Enumerator
normal 

Default strategy.

This is suitable for general purpose compression, and works
well in the majority of cases.
filtered 

Filtered strategy.

This strategy should be used when the data be compressed
is produced by a filter or predictor.
huffman 

Huffman-only strategy.

This strategy only performs Huffman encoding, without doing
any string matching.
rle 

Run Length Encoding strategy.

This strategy limits match distances to one, making it
equivalent to run length encoding. This can give better
performance for things like PNG image data.
fixed 

Fixed table strategy.

This strategy prevents the use of dynamic Huffman codes,
allowing for a simpler decoder for special applications.
Enumerator
Z_NO_COMPRESSION 
Z_BEST_SPEED 
Z_BEST_COMPRESSION 
Z_DEFAULT_COMPRESSION 
Enumerator
Z_BINARY 
Z_TEXT 
Z_UNKNOWN 

Function Documentation

std::size_t boost::beast::zlib::deflate_upper_bound ( std::size_t  bytes)
inline

Returns the upper limit on the size of a compressed block.

This function makes a conservative estimate of the maximum number of bytes needed to store the result of compressing a block of data.

Parameters
bytesThe size of the uncompressed data.
Returns
The maximum number of resulting compressed bytes.
error_code boost::beast::zlib::make_error_code ( error  ev)
inline