Reading and converting binary file 2 bits at a time

Olivier Pisano via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu Aug 27 03:30:51 PDT 2015


On Thursday, 27 August 2015 at 09:38:52 UTC, Andrew Brown wrote:

>
> That's lovely, thank you. One quick question, the length of the 
> file is not a multiple of the length of ubyte,  but the cast 
> still seems to work. Do you know how it converts a truncated 
> final section?
>
> Thanks again
>
> Andrew

Well, since the length of ubyte is 1, the length of the file is 
necessarily a multiple of the length of ubyte.


More information about the Digitalmars-d-learn mailing list