home | programming | software | artwork | literature | poetry contact me | host
c++ | excel

Programming, C++

[data compression]
RLE - run length encoding
MTF - move to front
BWT - burrows wheeler
Diatomic encoding
The static model

[bit io routines]
Bits & bytes
Bit io demo

'Bit IO Demo'

Simple Bit IO routine source code and executable for anlaysing file bytes / bits. Additional information for each function is displayed by the application i.e. the range of bytes read in and / or the filesize.

  • Write out 256 chars. Click to write out 256 chars (0-255) to a file anywhere on your PC. The default file extension is .TXT - then open the file to see the contents.
  • Read Bytes as Bits Click to read in a file and display the bits per byte.
  • Count Byte Occurance This will read in a file byte by byte, store the symbol counts and then bubble sort the array before displaying the resulting counts alongside their respective position in the array and the byte itself.
  • Count of Byte Pairs This will read in a file 2 bytes at a time, store the symbol counts and then display the resulting counts alongside their respective bytes (both as chars & ascii codes).
  • Count of Byte Triples This will read in a file 3 bytes at a time, store the symbol counts and then display the resulting counts alongside their respective bytes (both as chars & ascii codes).
  • Read & Write as Integers Click to read in a file, pad out their ascii equivalent codes (to 3 digit integers) and save them as one long code string to a file in the same directory on your PC.
  • Count Pairs of Bits In Byte Click to count the number of bit pairs in all bytes within a file i.e. '00', '00' and '01' will increment their respective counts to 2 and 1. The weight is the number of seperate occurances of bit pairs within the file bytes and I also supply a breakdown in byte form of the total bits that make up the entire filesize.
  • Clear Click to clear the current display.
I have left some of the functions used in large string manipulations within the example code. They can be used by simply passing the relevant function parameters and displaying the returned result. For example the function String MX2(String cs); returns a huge string, multiplied by 2.

 Click to view code as text file...   Click to download file...