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

Method compress

src/integercompressor.cpp:264–273  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

262}
263
264void IntegerCompressor::compress(I32 pred, I32 real, U32 context)
265{
266 assert(enc);
267 // the corrector will be within the interval [ - (corr_range - 1) ... + (corr_range - 1) ]
268 I32 corr = real - pred;
269 // we fold the corrector into the interval [ corr_min ... corr_max ]
270 if (corr < corr_min) corr += corr_range;
271 else if (corr > corr_max) corr -= corr_range;
272 writeCorrector(corr, mBits[context]);
273}
274
275void IntegerCompressor::initDecompressor()
276{

Callers 7

writeMethod · 0.80
writeMethod · 0.80
write_gps_timeMethod · 0.80
writeMethod · 0.80
writeMethod · 0.80
write_gps_timeMethod · 0.80
write_chunk_tableMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected