How to uncompress?
Posted: Mon Oct 09, 2006 1:48 pm
How to uncompress?
Code: Select all
delzss in.txt out.txt
Well, in that case try the attached file. The first parameter should be the file specification (wildcards allowed), the second one should be an output directory. Example:astro wrote:but i need to uncompress more than 2000 files
Code: Select all
DeLZSS c:\compressed\*.* c:\decompressed
I am sure that would be quite easy to do, but I have neither the C# experience nor the development environment necessary to do that.astro wrote:i need source in visual C#
Now that you mention it, I see that I should have written that ...Mr.Mouse wrote:It's in the file! DPR, Delphi code!
Sure, I can try. I can't promise anything, however, since the winter term of my studies starts in a few days. But let's see ...Mr.Mouse wrote:Can I interest you in taking a crack at that RA compression? See the TAW Total Air War thread.
Code: Select all
const byte NBits = 12;
const byte FBits = 4;
const byte Threshold = 3;
No, the constants are correct that way. If you change them, the decompression will fail. (The deal is this: All references into the history buffer [also called "sliding window"] are 16 bits [i. e. two bytes] wide. NBits and FBits specify how many bits of those 16 are used for the length and offset values. The Threshold value tells you the minimum length of a compressed sequence -- since a buffer reference takes up two bytes, only longer sequences are compressed, thus the value of three.)astro wrote:i've translated lzss decompressor code to C# but only half of file is decompressing correctly
maby i need to change this:Code: Select all
const byte NBits = 12; const byte FBits = 4; const byte Threshold = 3;
Code: Select all
if (Offset = 0) and (Len = 0) then
Exit;
Code: Select all
lifepoint_compressed.txt:
(3, 4078)
(4, 2)
(18, 10)
(18, 28)
(4, 4084)
(10, 114)
(6, 124)
match_compressed.txt:
(10, 4078)
(5, 4089)
(4, 7)
(5, 15)
(7, 21)
(3, 29)
(14, 37)
(5, 4089)
(3, 112)
(9, 65)
(3, 8)
(9, 39)
(7, 108)
(4, 127)
(4, 123)
(10, 4078)
(11, 108)
(18, 168)
(12, 186)
(12, 138)
(17, 151)
(12, 198)
(13, 149)
(12, 228)
(5, 274)
(12, 244)
(10, 291)
(6, 198)
Okay; you should first start by checking the most basic things. Have you verified that the input file has been read to memory correctly? (Examples: Is the first character of the input buffer within the DecompressBlock routine #255? Are the following characters correct? Does the buffer have the correct size?)astro wrote:my numbers are bad
Code: Select all
myprogram in.txt out.txt