Howdy folks - I'm writing a program to compress and uncompress a string
and keep getting weird results...  for a string of length 0-6, uncompress
stores garbage at the end of the string.  Length = 7, output is OK.
Length 8,9,10,11 - output is corrupted.  Length = 12, output is OK.

Program takes input on STDIN, compresses it into a temporary buffer and
then uncompress *that* buffer into another temporary buffer, printing the
result after compress/uncompress (so I can compare to the original):
----

penguin3:~/linux-client$ echo "This is a test" | ./compress
This is a test
penguin3:~/linux-client$ echo "This is a test 123" | ./compress
This is a test 123
@penguin3:~/linux-client$ echo "This is a test ABC" | ./compress
This is a test ABC
@penguin3:~/linux-client$

(the @ symbol actually contains 5 characters of garbage, but I can't
paste them into Pine because it thinks they're commands)

It also seems that the garbage introduced at the end remains constant for
a given input string length (regardless of the content of the string).

Any zlib experts out there have an idea on what might be going wrong?
(I'll e-mail the source if anyone wants to take a look)

TIA

..............................................................
Robert Giles                                             UT CS
[EMAIL PROTECTED]                http://www.daihatsu.org/


_______________________________________________
Siglinux mailing list
[EMAIL PROTECTED]
http://www.utacm.org/mailman/listinfo/siglinux

Reply via email to