MCPcopy
hub / github.com/borgbackup/borg / pack

Function pack

src/borg/legacyremote.py:912–915  ·  view source on GitHub ↗
(data)

Source from the content-addressed store, hash-verified

910 compressor = Compressor("lz4")
911
912 def pack(data):
913 csize, decrypted = data
914 meta, compressed = compressor.compress({}, decrypted)
915 return cache_struct.pack(csize, xxh64(compressed).digest(), meta["ctype"], meta["clevel"]) + compressed
916
917 def unpack(data):
918 data = memoryview(data)

Callers

nothing calls this directly

Calls 2

packMethod · 0.80
digestMethod · 0.80

Tested by

no test coverage detected