Path: csiph.com!weretis.net!feeder4.news.weretis.net!border2.nntp.ams1.giganews.com!nntp.giganews.com!buffer2.nntp.ams1.giganews.com!nntp.brightview.co.uk!news.brightview.co.uk.POSTED!not-for-mail NNTP-Posting-Date: Fri, 17 Jun 2016 12:32:05 -0500 From: Gareth Owen Newsgroups: comp.lang.c Subject: Re: [sOT] compression 1 GB downto 100 MB References: <98ce3a57-1b36-4430-8050-8e659b5fc4e4@googlegroups.com> <2d2820aa-1540-40ee-99d7-53c5d83c066a@googlegroups.com> <45e68342-2ed9-4877-9e78-4ca0731e9c19@googlegroups.com> <50c69be8-2430-4d5d-953c-07ec90ac9380@googlegroups.com> Date: Fri, 17 Jun 2016 18:32:05 +0100 Message-ID: <87twgroh62.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:stbj+IaoB45AH/4vQKZomYeHCiI= MIME-Version: 1.0 Content-Type: text/plain Lines: 21 X-Usenet-Provider: http://www.giganews.com X-Trace: sv3-fqAY3KrcRHQriLDA6DWLNJkifMjJ7id1ztGKJl8zwbUeKuGsnH052Tx7gjbuJC5oSX2nzcJPE+47MYG!8lvOSIbMiUbAUFfxCBD6HQbdnBLaA8ZgjOo136+uHYa6Trrg168Sba/MY59aXerAbJr2iA== X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 2027 Xref: csiph.com comp.lang.c:89436 Richard Heathfield writes: > It hardly matters, and you're missing the point. If there were a way > to guarantee the compression of arbitrary data, /all/ data could be > reduced to a single bit. > > Good luck decompressing that. Oh its easy. We invent a compression scheme that treats a data containing n bits file as an n-bit number, N. Our algorithm is : Odd N compress to N-1. Even N compress to N/2. We compress our file an arbitrary number of times until all that's left is a single zero bit. Then we send that single zero bit - near perfect compression! (All we need to tell the decompressor how many times we need to decompress the data, but thats trivial.)