reverse operation of compress_entry
(self, entry_packed)
| 439 | return msgpack.packb(entry) |
| 440 | |
| 441 | def decompress_entry(self, entry_packed): |
| 442 | """reverse operation of compress_entry""" |
| 443 | assert isinstance(self.chunks, ChunkIndex), f"{self.chunks} is not a ChunkIndex" |
| 444 | assert isinstance(entry_packed, bytes) |
| 445 | entry = msgpack.unpackb(entry_packed) |
| 446 | entry = FileCacheEntry(*entry) |
| 447 | chunks = [] |
| 448 | for idx in entry.chunks: |
| 449 | assert isinstance(idx, int), f"{idx} is not an int" |
| 450 | id = self.chunks.idx_to_k(idx) |
| 451 | cie = self.chunks[id] |
| 452 | assert cie.size > 0 |
| 453 | chunks.append((id, cie.size)) |
| 454 | entry = entry._replace(chunks=chunks) |
| 455 | return entry |
| 456 | |
| 457 | @property |
| 458 | def files(self): |
no outgoing calls
no test coverage detected