🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
1 messages
1 total messages Started by The Archiver Fri, 22 Feb 2002 10:22
Re: yEnc - offsets OTHER than +42
#56801
Author: The Archiver
Date: Fri, 22 Feb 2002 10:22
94 lines
3239 bytes
lordsnow@home.nl (=-lordsnow-=) wrote:

>Has anyone out there done any tests with offsets
>other than 42? i.e. tried to find the optimal
>offset and used that...
>Anyone have any file-sizes to compare?

For your convience I did make a google-search for one of posts
here about this topic. This is a full quote.

I cannot find the original datafile(s) on my harddisks - sorry.

HTH
-- 
Juergen

- - - - - snip - - - - 

Von:The Archiver (archiver@i3w.com)
Betrifft:CP compression (or any) - some numbers... 
Newsgroups:news.software.nntp
View: Complete Thread (13 articles) | Original Format 
Datum:2001-07-30 07:28:06 PST 
 

If someone wants to define a new scheme for compressing 
binaries efficiently (with an 8 bit mode) and has to encode
special chars (NUL, TAB, CR, LF) with 'escape chars':

I did a scan on a few common filetypes and made an 
evaluation of the occurrence of bytes.
A good compressed file would have an occurence of
approx 0.39% for each binary value (1 / 256).

1500 JPG pictures:

0x00: 1.3 %
0x01: 0.42 %
0xFE: 0.52 %
0xFF: 0.7%

500 MB AVI-DivX files

0x00: 1.54%
0x01: 0.69%
0x05: 0.71%
0x80: 0.68%
0xFF: 0.33%

500 MB  MP3-files

0x00: 1.77%
0x01: 0.43%
0xFB: 0.62%
0xFF: 1.30%

500 MB MPG file (movie)

0x00: 4.6%  (!)
0x01: 1.3%
0x02: 0.7%
0x60: 0.5%
0x80: 0.9%
0xFE: 0.28%
0xFF: 0.78%

In the 'extreme' case an MPG file would result in an overhead
of > 8% if all NULL chars would be encoded with a double
byte escape character.


If I would be the one who defines a new encoding then I would
introduce a fixed (or variable) additive factor to each byte before
encoding (and checking for NUL,TAB,CR,LF) is done.

For a fixed value I would propose to add '42' to each byte
before encoding.

This makes sure that the special chars (FE,FF,00..31) are all
moved to '7-bit-ascii' and just the uncommon characters
214,223,224,227 are encoded with a two byte escape value.

Compressed binaries really tend to use 00/01/FF more often
than other values. And if a simple addition can save up to 8%
then it might be worth thinking about it.


Just my three cents (one cent for my binary archive ;-)
Thanks for considering.

-- 
Juergen, [The Archiver]

Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads