Keelan Brening

CMPS 4350: Advanced Software Engineering

Project 1:

File Specifications

Name:
KB - Keelan Brening Compression

Description:

The KB file compression follows the LZ-77 algorithm. At this time the current version does not have LZ-77 fully intergrated and have proper compression. LZ-77 allows for files of any type to be compresses and decompressed without loosing the data or the original file name.

When the data is compressed, it will be stored in 3 bytes of characters.
1st char byte: Offset
2nd char byte: size of repeated data
3rd char byte: next character

EX:
'0' '0' 'b' = 00b
'0' '0' 'o' = 00o
'1' '1' 'k' = 11k

The line will look like this
00b00o11k

Format:
Each KB file is formated in the following:
  1. The file header will have a "KB" to identify the file type.
  2. Whitespace
  3. Original file with extension
  4. Whitespace
  5. Whitespace
  6. Encrypted data will all be in one line

KB format's the first line to includes the KB as its header. This
tells the program that the file is in KB formate.

The second line hold the original file name with extension.
This allows the decompression of the file to be given its original name back

The last part of the formate is one line containing a new line
It seperates the compressed information from the file information

File Example:

  1. KB
  2. example.txt
  3. {Newline}
  4. {Encoded data is all in this line}

kcachegrind Screenshot