Skip to main content

encode_directory

Function encode_directory 

Source
pub fn encode_directory(entries: &[TileEntry]) -> Vec<u8> 
Expand description

Encode tile entries into the v5 directory buffer.

Entries are sorted into directory order (zoom, hilbert, time_start) first, so the caller need not pre-sort. Two entries are considered to share a blob (and so RLE-collapse) when their (pack_id, offset, length, uncompressed_size, crc32c) all match — which is exactly what the dedup-on-write path produces for byte-identical tiles within one pack. The pack_id is part of the run identity (v5): two entries collapse only when they live in the same pack and point at the same blob.