9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] why is image(6) compression so poor?
@ 2003-02-19 16:50 rog
  2003-02-19 17:38 ` Russ Cox
  0 siblings, 1 reply; 3+ messages in thread
From: rog @ 2003-02-19 16:50 UTC (permalink / raw)
  To: 9fans

i recently observed that when writing a 500x500 all-white RGB24 image
in image(6) format, compressed, the resulting file is 45295 bytes.

gif compression, on the other hand, gives a file of 1689 bytes...

is this a bug, or a limitation of the compression scheme?



^ permalink raw reply	[flat|nested] 3+ messages in thread
* Re: [9fans] why is image(6) compression so poor?
@ 2003-02-19 20:21 rog
  0 siblings, 0 replies; 3+ messages in thread
From: rog @ 2003-02-19 20:21 UTC (permalink / raw)
  To: 9fans

> 72+5996*7+3446 = 45280.

serves me right for not doing some simple arithmetic!

actually, it's interesting to observe that for small files
image(6) compression is sometimes better than gif.

overall though, its files seem to average about 50% bigger
(at least that's what the font images average).

it's probably worth it when the compression and decompression
routines combined come to only 272 lines!



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-02-19 20:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-02-19 16:50 [9fans] why is image(6) compression so poor? rog
2003-02-19 17:38 ` Russ Cox
2003-02-19 20:21 rog

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).