This is an update of pngdb (since it handles .gz files the name has changed)
-s is for quick comparison of stream lengths in bits
defdb: displays deflate block Type Boundary and Size & full stream size in bits.
Version 0.4b (18 May 2014) by Frederic Kayser
Usage: defdb [-s|-d|-t|-a|-w] file[.png|.gz]
Options: -s displays only the Deflate stream overall size
-d dumps the entire Deflate stream in human readable form
-t same as option d plus printable ASCII literals
-a displays header analyse
-w writes the raw deflate stream in file raw_deflate_stream
-a is not finished yet, it is ment to compare the current header and a zlib produced one.
-d is a nice way to understand how a deflate stream is actually made.
Each line represents an element of the stream, its size (in bits) is figured between square brackets .
Concerning the block headers you have to be familiar with RFC 1951 to understand them.
Once in the data stream itself these conventions are used:
- [size] XX, a literal value XX in hexa (ranges from 00 to FF that is 0 to 255), takes size bits.
- [size] (length, distance), LZ pair in decimal -length between 3 and 258, distance between 1 and 32768-, takes size bits.
- [size] EofB, End of Block, takes size bits.
It looks like this:
 00 -> a literal of value 00, takes 3 bits in the stream
 (3,1) -> an LZ match of length 3 and distance 1, takes 9 bits in the stream (9 is the sum of two parts: the lenght length and the distance length these can be found in the block header).
I've started an experimental work to display compression efficiency of text files in the same way as pngthermal, it's called gzthermal.