8 bits per byte, all ones.
To do it right, the first should have 57885161%8 ones, but that probably doesn't
change the compression much. But okay:
BEGIN {
n=57885161;
printf "%c", rshift(255,8-n%8);
for(i=1;i<n;i+=8) printf "%c",255;
}
08/05/2015 04:01 PM 7,235,646 prime.out
08/05/2015 04:01 PM 7,047 prime.out.gz
08/05/2015 04:01 PM 93 prime.out.gz.gz
Oh, yes, it should have said 7235646 bytes of X'FF',
Now it is X'01',723646X'FF'
(and the third compression increased the original from 90 to 110 bytes.)
-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf
Of Bob Rutledge
Sent: Wednesday, August 5, 2015 2:54 PM
To: [email protected]
Subject: Re: useless but amusing: largest known prime
Why i+=8?
Bob
On 8/5/2015 5:11 PM, Glen Hermannsfeldt (Contractor) wrote:
> Instead of a file with 57885161 C'1', I tried a file of 57885161 X'FF'.
>
> BEGIN {
> for(i=0;i<57885161;i+=8) printf "%c",255; }
>
> 08/05/2015 02:02 PM 7,235,646 prime.out
> 08/05/2015 02:03 PM 7,046 prime.out.gz
> 08/05/2015 02:04 PM 90 prime.out.gz.gz
>
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN