ref: a8d79e9a9a77964454bd17e8e41d59d3d286f430
parent: c3fd0cd893791811cbdc0765df3ab5a3317b33a6
	author: cinap_lenrek <cinap_lenrek@felloff.net>
	date: Sat Dec  9 13:20:29 EST 2017
	
libflate: force non-empty huffman table in mkzprecode() for deflate busybox gunzip fails on empty (offset) huffman tables, so force one entry. gzip states in a comment: The pkzip format requires that at least one distance code exists, and that at least one bit should be sent even if there is only one possible code.
--- a/sys/src/libflate/deflate.c
+++ b/sys/src/libflate/deflate.c
@@ -1063,6 +1063,11 @@
}
if(bitcount[0] != 0)
return 0;
+	if(nbits == 0){+ bitcount[1] = 1;
+ nbits = 1;
+ tab[0].bits = 1;
+ }
return hufftabinit(tab, n, bitcount, nbits);
}
--
⑨