MCPcopy Create free account
hub / github.com/CobaltFusion/DebugViewPP / EmitCopy

Function EmitCopy

Libraries/snappy/snappy.cc:217–233  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

215}
216
217static inline char* EmitCopy(char* op, size_t offset, int len) {
218 // Emit 64 byte copies but make sure to keep at least four bytes reserved
219 while (len >= 68) {
220 op = EmitCopyLessThan64(op, offset, 64);
221 len -= 64;
222 }
223
224 // Emit an extra 60 byte copy if have too much data to fit in one copy
225 if (len > 64) {
226 op = EmitCopyLessThan64(op, offset, 60);
227 len -= 60;
228 }
229
230 // Emit remainder
231 op = EmitCopyLessThan64(op, offset, len);
232 return op;
233}
234
235
236bool GetUncompressedLength(const char* start, size_t n, size_t* result) {

Callers 1

CompressFragmentFunction · 0.85

Calls 1

EmitCopyLessThan64Function · 0.85

Tested by

no test coverage detected