Live data from Hacker News

Zlib visualizer

lynn.github.io

11–20 of 33 posts

Re: Zlib visualizer

#11
As someone who's never really read that much on compression stuff, I have absolutely zero clue what this visualisation is actually showing me.

That's compounded by the lack of legend. What do the different shades of blue and purple tell me? What is Orange?

e.g. on a given text in an orange block it puts e.g. x4seems to indicate that the first 4 binary values for the block are important, but I can't figure out what that 135 is referencing (I assume it's some pointer to a value?)

Re: Zlib visualizer

#12
post #11

As someone who's never really read that much on compression stuff, I have absolutely zero clue what this visualisation is actually showing me. That's compounded by the lack of legend. What do the different shades of blue and purple tell me? What is Orange? e.g. on a given text in an orange block it puts e.g. x4 seems to indicate that the first 4 binary values for the block are important, but I can't figure out what t…

It is a backreference, the main way of dealing with full or partial repetitions in the LZ77 algorithm. It literally means: copy 4 characters from the backward offset of 135. Note that this "backward offset" can overlap previously repeated characters, so x10<-1 equally means: copy the last character 10 times.

Re: Zlib visualizer

#13
post #9

Two and a half issues: 1) The handling of dynamic blocks leaves something to be desired. The parameters are left mostly undecoded. It'd be really neat if the Huffman symbols were listed somewhere, rather than just being left implicit. 2) The visualization falls apart pretty badly for texts consisting of more than one block (which tends to happen around 32 KB) - symbols are still decoded, but references all show up bl…

Exactly, it misses out on explaining how the fixed Huffman table is interpreted to apply symbol and distance codes, or how dynamic tables are derived from the input itself. Sure it's the hardest part, but also the more interesting to visualize. As another commenter pointed out, we are just left with mysterious bit sequences for these codes.

It would be cool if we could supply our own Huffman table and see how that affects the stream itself. We might want to put our text right there! https://github.com/nevesnunes/deflate-frolicking?tab=readme-...

Re: Zlib visualizer

#14
post #10
post #8

Earlier quoted context omitted.

How is that a thing? Guess I shall go down the rabbit hole.

Also for me the first time i hear about this. There goes the next hour.

Please report back, as many of us don't have an hour. We rely on soldiers like you! Thanks!

Re: Zlib visualizer

#16
post #10

Earlier quoted context omitted.

Also for me the first time i hear about this. There goes the next hour.

Please report back, as many of us don't have an hour. We rely on soldiers like you! Thanks!

It's mostly what heliodex said, that it's a copypasta when ppl need big text. There's also a compression meme around the bee and other movies (on yt: bee movie in 10s or it gets faster everytime X). But unlike i thought in the beginning it's not a zlib specific joke.

Re: Zlib visualizer

#17
post #7

Earlier quoted context omitted.

if you paste contents which contain a very particular string ("intends to sue the human race for stealing our honey"), the contents are replaced with the phrase "the bee movie script? really? how original"

Also got got. I assume the Bee Movie script is the first choice for a lot of people needing an ad-hoc big block of text. It also compresses pretty well. https://github.com/lynn/flateview/blob/2668beaa5cc8cae387b6f...

What happened to lorem ipsum?

Re: Zlib visualizer

#18
post #16

Earlier quoted context omitted.

Please report back, as many of us don't have an hour. We rely on soldiers like you! Thanks!

It's mostly what heliodex said, that it's a copypasta when ppl need big text. There's also a compression meme around the bee and other movies (on yt: bee movie in 10s or it gets faster everytime X). But unlike i thought in the beginning it's not a zlib specific joke.

Yeah, the movie became a bit of a meme at some point and somehow shoehorning in "the entire bee movie script" into random places became a part of that.

Re: Zlib visualizer

#19
post #17
post #7

Earlier quoted context omitted.

Also got got. I assume the Bee Movie script is the first choice for a lot of people needing an ad-hoc big block of text. It also compresses pretty well. https://github.com/lynn/flateview/blob/2668beaa5cc8cae387b6f...

What happened to lorem ipsum?

not easily compressible, i guess?

Re: Zlib visualizer

#20
The byte counter seems broken somehow. "Compressing" a single character with a compression level of 0 says "12 bytes", yet in the visualization there's less than 8 bytes (~7.5).

When compressing with a level higher than 0, the bits also don't appear to add up to a natural number of bytes, so I'm thinking the visualization is missing some padding?

Post reply on HN