Hobbel Bit DLL
This DLL allows you to write and read bits from a file with Game Maker.
A very useful feature is that you can set a size of bits you want to read or write.
So you can write a 3 bits integer without creating to much file size on writing a byte (8 bits).
For example view this:
In the download a file called "bitlist.txt" is included wich has a list of bit size 1 till 31, followed by the maximum value can be writed with that number of bits.
Ofcourse a .gmd example, the .gml scripts, and .gmd and .gm6 embed files are included.
The multi bit writing goes in one call,
like writing 16 bits
Writing 4 bits twice, only writes one byte like this:
val 1: 1111 val 2: 1111
Data writed: 11111111
My dll only writes the bits into a byte when enough bits are given (except you close writing),
the same fact goes for reading.
I've added this to stop confusion for a bit ...
Edited by h0bbel, 19 September 2013 - 06:55 PM.