currently I\'m implementing the Burrows-Wheeler transform (and inverse transform) for raw data (like jpg etc.). When testing on normal data like textfiles no problems occur.
You cannot do this without an OS dependency. The C language specification says (7.19.3)
At program startup, three text streams are predefined...
stdin is a text stream. Depending on your OS, there may be ways to change the mode of an existing stream or access the low-level stream data, but you claim that you do not want any OS-specific code.