MCPcopy Create free account
hub / github.com/LASzip/LASzip / writeBit

Method writeBit

src/arithmeticencoder.cpp:246–255  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

244}
245
246void ArithmeticEncoder::writeBit(U32 sym)
247{
248 assert(sym < 2);
249
250 U32 init_base = base;
251 base += sym * (length >>= 1); // new interval base and length
252
253 if (init_base > base) propagate_carry(); // overflow = carry
254 if (length < AC__MinLength) renorm_enc_interval(); // renormalization
255}
256
257void ArithmeticEncoder::writeBits(U32 bits, U32 sym)
258{

Callers 1

writeCorrectorMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected