<html><body><div style="color:#000; background-color:#fff; font-family:verdana, helvetica, sans-serif;font-size:10pt"><div style="font-family: verdana, helvetica, sans-serif; font-size: 10pt; "><span>Hi, the attached file is a .wav file created on Windows and compressed with TPAbbrevia's DeflateStream method of AbZipPrc unit.</span></div><div style="font-family: verdana, helvetica, sans-serif; font-size: 10pt; "><span><br></span></div><div style="font-family: verdana, helvetica, sans-serif; font-size: 10pt; "><span>I need to decompress it using fpc and save to a folder, to be played with mplayer.</span></div><div style="font-family: verdana, helvetica, sans-serif; font-size: 10pt; "><span><br></span></div><div style="font-family: verdana, helvetica, sans-serif; font-size: 10pt; ">This snippet shows what I'm doing to decompress the file, but I'm getting "buffer error" in DeCompress method.</div><div style="font-family: verdana, helvetica, sans-serif;
font-size: 10pt; "><span><br></span></div><div style="font-family: verdana, helvetica, sans-serif; font-size: 10pt; "><span> lcompressedStream := TMemoryStream.Create;</span></div><div style="font-family: verdana, helvetica, sans-serif; font-size: 10pt; "> lUncompressedStream := TMemoryStream.Create;</div><div style="font-family: verdana, helvetica, sans-serif; font-size: 10pt; "><span> lcompressedStream.LoadFromFile('compressed.file');</span></div><div><span><div><font class="Apple-style-span" size="2"> lcompressedStream.Position:= 0;</font></div><div><font class="Apple-style-span" size="2"> lDecompressor := TInflater.Create(lcompressedStream, lUncompressedStream, lcompressedStream.Size);</font></div><div><font class="Apple-style-span" size="2"> try</font></div><div><font class="Apple-style-span" size="2">
lDecompressor.DeCompress;</font></div><div><font class="Apple-style-span" size="2"> lUncompressedStream.Position:= 0;</font></div><div><font class="Apple-style-span" size="2"> lUncompressedStream.SaveToFile('output.wav');</font></div><div><font class="Apple-style-span" size="2"> finally</font></div><div><font class="Apple-style-span" size="2"> lDecompressor.Free;</font></div><div><div><font class="Apple-style-span" size="2"> lcompressedStream.Free;</font></div><font class="Apple-style-span" size="2"> lUncompressedStream.Free;</font></div><div><font class="Apple-style-span" size="2"> end; </font></div><div style="font-family: verdana, helvetica, sans-serif; font-size: 10pt; "><br></div><div style="font-family: verdana, helvetica, sans-serif; font-size: 10pt; ">Does anyone can check the attached file to help me to uncompress
it?.</div><div style="font-family: verdana, helvetica, sans-serif; font-size: 10pt; "><br></div><div style="font-family: verdana, helvetica, sans-serif; font-size: 10pt; ">Maybe TInflater is not the class that I should use to decompress this file.</div></span></div><div style="font-family: verdana, helvetica, sans-serif; font-size: 10pt; "> </div><div style="font-family: verdana, helvetica, sans-serif; font-size: 10pt; ">Leonardo M. Ramé<br>http://leonardorame.blogspot.com</div></div></body></html>