Re: Bit field vs bit manipulation?



As far as the efficiency of your compression algortihm, you
should compare it to others before you make conclusions.
For example use WinZip on the source file and compare the
resulting size against what you achieve.

As for how this relates to your original question, I have only
a marginal idea. I suppose you want your table values aligned
on 4 bytes boundaries for runtime speed and thus using a bit
field struct.

--
=====================================
Alexander Nickolov
Microsoft MVP [VC], MCSD
email: agnickolov@xxxxxxxx
MVP VC FAQ: http://vcfaq.mvps.org
=====================================

"David Bender" <DavidBender@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:B5702C69-6294-4D04-9DB1-B788975CDABA@xxxxxxxxxxxxxxxx
"Alexander Nickolov" wrote:

I'm not sure what you are really trying to achieve. Do you actually
output a garbage (for example zero) byte after each 3 bytes and
then read it back in order to ensure proper in-memory alignment?


Well, imagine building a table of 4096 entries using 12bit groups.
Now use that same table to find repeating values. Example;

Input 3 bytes, 54 45 64 and the output is 0544 0564. And the
leading zeros are useless.

The object is using a table and an index to re-write any file.
Where the table can be encrypted and the data is not. So,
if the table is unreadable then so is the data.

My last test was on a 733MB file. The table and index was
made the file about 488MB. I think encryption and compressing
to 66% is very good.


.



Relevant Pages

  • Re: if statement
    ... The zero argument tells Matchto return the first *exact* match. ... > There can be 6 different numbers in the target evaluation cell and I want ... > compare it 6 different ways and if it matches the correct value compared ... > can't get it to string together more than the one comparison. ...
    (microsoft.public.excel.misc)
  • Re: writing a two hour movie script
    ... You're an idiot, appropriately named "Zero". ... includes TV movies and small companies. ... but to top it all off, you don't compare the number of aspiring ... agent in Florida on the Net who sold the book for him. ...
    (misc.writing)
  • Re: Why is "False" = "-1"?
    ... A must be compared to zero or some other ... (Excepting perhaps for a dumb compiler and I ... dumb--actually a couple of his examples show better code generation than ... the machine instruction to compare to--whether it's zero or nonzero ...
    (microsoft.public.vb.general.discussion)
  • Re: Well Ordering the Reals
    ... >>> If you do not specify the number of bits, then you don't know what number ... >>> number in order to compare it with another number. ... A TO-number starting with a zero and having infinitely many zeros ... So how does one tell, strictly from their representations, which is ...
    (sci.math)
  • Re: This calculation is just wrong / computer cant count!
    ... result is displayed on the screen (in an edit boxes) along with all the ... You cannot perform floating point math on a computer and compare the ... considered zero. ...
    (microsoft.public.vc.mfc)