From 0ff87c1d22065ce6c5da2d31bf33f6a1e8852ed9 Mon Sep 17 00:00:00 2001 From: "Sascha L. Teichmann" Date: Wed, 10 Sep 2014 08:35:20 +0200 Subject: [PATCH] Added a comment about the zlib compressed content and meta data in the blocks. --- tilemapper/blockdecoder.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tilemapper/blockdecoder.go b/tilemapper/blockdecoder.go index cb4dcf2..3edefa9 100644 --- a/tilemapper/blockdecoder.go +++ b/tilemapper/blockdecoder.go @@ -30,6 +30,12 @@ type DecodedBlock struct { IndexMap map[int]int } +// The content of the map and the meta data are compressed with zlib. +// Unfortunately the byte length of this two structures are not stored +// explicitly in the block data. To access the informations behind +// them (e.g. the node id mappings) we have to count the bytes consumed +// by the zlib reader and continue our extraction process behind this +// offset. PosBuf implements such a counting reader source. type PosBuf struct { Data []byte Pos int