Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

OK, I understand.

As a side note, I send my PNG when needed in JSON (larger, with base64 encoding, I didn't try to make a comparison with ASCII art format) and I find that with getImageData getting the indexed colors is fast and easy. I was referring to bidirectional compression because PNG filter (applied before the deflate) uses the fact that pixels are often similar on both axes.

Of course, without a few tests and comparisons, I can't be sure I really gain in size, but I like to use the fact that my map is an image (faster to draw on the screen at some resolutions and image manipulation server side - my zero indexes are simply mapped to the transparent "color" as is common in most color palettes).

I have different constraints trough, as my map contains 3200x1600 pixels and not 64x64, so that I really need those compressions for instant display.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: