[fpc-devel] Deflating file created with TPAbbrevia
Leonardo M. Ramé
martinrame at yahoo.com
Fri Aug 26 15:44:09 CEST 2011
Hi, the attached file is a .wav file created on Windows and compressed with TPAbbrevia's DeflateStream method of AbZipPrc unit.
I need to decompress it using fpc and save to a folder, to be played with mplayer.
This snippet shows what I'm doing to decompress the file, but I'm getting "buffer error" in DeCompress method.
lcompressedStream := TMemoryStream.Create;
lUncompressedStream := TMemoryStream.Create;
lcompressedStream.LoadFromFile('compressed.file');
lcompressedStream.Position:= 0;
lDecompressor := TInflater.Create(lcompressedStream, lUncompressedStream, lcompressedStream.Size);
try
lDecompressor.DeCompress;
lUncompressedStream.Position:= 0;
lUncompressedStream.SaveToFile('output.wav');
finally
lDecompressor.Free;
lcompressedStream.Free; lUncompressedStream.Free;
end;
Does anyone can check the attached file to help me to uncompress it?.
Maybe TInflater is not the class that I should use to decompress this file.
Leonardo M. Ramé
http://leonardorame.blogspot.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20110826/443f8607/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: compressed.file
Type: application/octet-stream
Size: 24347 bytes
Desc: not available
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20110826/443f8607/attachment.obj>
More information about the fpc-devel
mailing list