MCPcopy Create free account
hub / github.com/OGSR/OGSR-Engine / w_compressed

Method w_compressed

ogsr_engine/xrCore/FS.cpp:135–147  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

133}
134
135void IWriter::w_compressed(void* ptr, size_t count, const bool encrypt, const bool is_ww)
136{
137 BYTE* dest = 0;
138 size_t dest_sz = 0;
139 _compressLZ(&dest, &dest_sz, ptr, count);
140
141 if (encrypt)
142 g_trivial_encryptor.encode(dest, dest_sz, dest, is_ww ? trivial_encryptor::key_flag::worldwide : trivial_encryptor::key_flag::russian);
143
144 if (dest && dest_sz)
145 w(dest, dest_sz);
146 xr_free(dest);
147}
148
149void IWriter::w_chunk(u32 type, void* data, size_t size, const bool encrypt, const bool is_ww)
150{

Callers

nothing calls this directly

Calls 3

_compressLZFunction · 0.85
xr_freeFunction · 0.85
encodeMethod · 0.80

Tested by

no test coverage detected