MCPcopy Create free account
hub / github.com/diasurgical/DevilutionX / CompressData

Function CompressData

Source/msg.cpp:604–617  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

602}
603
604uint32_t CompressData(byte *buffer, byte *end)
605{
606#ifdef USE_PKWARE
607 const auto size = static_cast<uint32_t>(end - buffer - 1);
608 const uint32_t pkSize = PkwareCompress(buffer + 1, size);
609
610 *buffer = size != pkSize ? byte { 1 } : byte { 0 };
611
612 return pkSize + 1;
613#else
614 *buffer = byte { 0 };
615 return end - buffer;
616#endif
617}
618
619void DeltaImportData(_cmd_id cmd, uint32_t recvOffset)
620{

Callers 1

DeltaExportDataFunction · 0.85

Calls 1

PkwareCompressFunction · 0.85

Tested by

no test coverage detected