Text compression program
807607Jan 2 2007 — edited Jan 2 2007Hi, i am writing a text compression program, which takes a file and outputs it as a series of Hex numbers.
At present, i have written a small amount of code which simply transforms each charcter to a hex figure. I have been using the toHexString method of the Integer class, which has been returning the number in the format 2e. As i have been given a decompressor program to work with, my hex must take the form 0x2e.
The decompressor analyses one byte at a time, so instead of taking 0x2e, it is taking 0, x, 2, and e as 4 bytes. Does anyone know if there is a way i can change the type of my string so that this will work?
Thanks in advance...