RPNX::Compress
Self-contained C++20 compression and ZIP library
 
Loading...
Searching...
No Matches
rpnx::compression::xz_codec::range_encoder Class Reference

One-shot LZMA range encoder used by the deterministic literal encoder. More...

#include <xz.hpp>

Public Member Functions

void encode_bit (std::uint16_t &probability, std::uint8_t bit)
 Encodes one adaptive binary symbol.
 
std::vector< std::byte > finish ()
 Finishes the range stream.
 

Detailed Description

One-shot LZMA range encoder used by the deterministic literal encoder.

Definition at line 311 of file xz.hpp.

Member Function Documentation

◆ encode_bit()

void rpnx::compression::xz_codec::range_encoder::encode_bit ( std::uint16_t & probability,
std::uint8_t bit )
inline

Encodes one adaptive binary symbol.

Parameters
probabilityProbability updated in place after encoding.
bitSymbol value, either zero or one.

Definition at line 319 of file xz.hpp.

References rpnx::compression::xz_codec::probability_move_bits, rpnx::compression::xz_codec::probability_total, and rpnx::compression::xz_codec::range_top.

Referenced by rpnx::compression::xz_codec::compress_lzma_literals().

◆ finish()

std::vector< std::byte > rpnx::compression::xz_codec::range_encoder::finish ( )
inlinenodiscard

Finishes the range stream.

Returns
Five-byte-terminated encoded representation.

Definition at line 344 of file xz.hpp.

Referenced by rpnx::compression::xz_codec::compress_lzma_literals().


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