RPNX::Compress
Self-contained C++20 compression and ZIP library
 
Loading...
Searching...
No Matches
deflate.hpp File Reference

Native raw DEFLATE, zlib, and gzip coding implementation. More...

#include <algorithm>
#include <array>
#include <cstddef>
#include <cstdint>
#include <iterator>
#include <limits>
#include <span>
#include <string>
#include <type_traits>
#include <utility>
#include <vector>
#include <rpnx/compression/implementation/io.hpp>

Go to the source code of this file.

Classes

class  rpnx::compression::deflate_codec::huffman_decoder
 Canonical Huffman decoder for the bit-reversed codes used by DEFLATE. More...
 
class  rpnx::compression::deflate_codec::iterator_bit_writer< output_iterator >
 LSB-first bit writer that emits bytes through an STL output iterator. More...
 
class  rpnx::compression::deflate_codec::iterator_bit_reader< byte_reader_type >
 LSB-first bit reader that consumes a single-pass byte reader. More...
 

Namespaces

namespace  rpnx::compression
 Facilities for creating and decoding supported compressed streams.
 
namespace  rpnx::compression::deflate_codec
 Internal implementation shared by raw DEFLATE, zlib, gzip, and ZIP.
 

Functions

std::uint16_t rpnx::compression::deflate_codec::reverse_bits (std::uint16_t value, std::uint8_t bit_count) noexcept
 Reverses the selected low bits for DEFLATE wire order.
 
template<typename writer_type>
void rpnx::compression::deflate_codec::write_fixed_symbol (writer_type &writer, std::uint16_t symbol)
 Emits one fixed-Huffman literal or length symbol.
 
std::uint32_t rpnx::compression::deflate_codec::crc32 (std::span< std::byte const > input) noexcept
 Computes the reflected IEEE CRC-32 used by gzip and ZIP.
 
template<typename writer_type>
void rpnx::compression::deflate_codec::compress_fixed_block (writer_type &writer, std::span< std::byte const > input, bool final_block, std::int32_t level)
 Emits one fixed-Huffman DEFLATE block from a bounded search buffer.
 
template<std::input_iterator input_iterator, std::sentinel_for< input_iterator > sentinel, typename output_iterator>
output_iterator rpnx::compression::deflate_codec::compress (format stream_format, input_iterator first, sentinel last, output_iterator output, compression_options const &options)
 Compresses an iterator range as raw DEFLATE, zlib, or gzip.
 
template<std::input_iterator input_iterator, std::sentinel_for< input_iterator > sentinel, typename output_iterator>
output_iterator rpnx::compression::deflate_codec::decompress (format stream_format, input_iterator first, sentinel last, output_iterator output, decompression_options const &options)
 Decompresses raw DEFLATE, zlib, or gzip input.
 

Detailed Description

Native raw DEFLATE, zlib, and gzip coding implementation.

Definition in file deflate.hpp.