Ported new map block offset in version >= 27 from C++ mapper.

Needs testing.
See 21444d00c3
This commit is contained in:
Sascha L. Teichmann 2017-02-23 16:08:16 +01:00
parent 833cc15d73
commit 90279506d1

View File

@ -105,9 +105,14 @@ func NewDecodedBlock(data []byte, colors *Colors) (db *DecodedBlock, err error)
uncompressedLen := nodeCount * (contentWidth + paramsWidth)
offset := 2
if version >= 22 {
var offset int
switch {
case version >= 27:
offset = 6
case version >= 22:
offset = 4
default:
offset = 2
}
zr := zlibReaderPool.Get().(interface {