Re: [fpc-pascal] GZip - Stream decompress only in memory

2016-09-04 Thread Michael Van Canneyt
On Sun, 4 Sep 2016, Marcos Douglas wrote: Ok, it works now. For the records, I've used the lib http://www.gocher.me/GZIP (Silvio's tip) and the function Base64Decode from WST framework http://svn.code.sf.net/p/lazarus-ccr/svn/wst/trunk/ For some reason the function DecodeBase64 from Synapse

Re: [fpc-pascal] Linking to Linux on a FreeBSD system with Linux emulated ?

2016-09-04 Thread fredvs
> And for a other problem with fpc, no aswer yet... > https://forums.freebsd.org/threads/57520/ > Yep, this one I get it. This fpc parameter (that I was using) is not compatible for cross compiling: -*XX* (Link smart). Without this, fpc can

Re: [fpc-pascal] GZip - Stream decompress only in memory

2016-09-04 Thread Michalis Kamburelis
2016-09-04 18:08 GMT+02:00 Marcos Douglas : > I have streams compressed using GZip. I get these streams from WebServices. > So, how can I decompress these streams only in memory? It seems you already have a solution, but here's another one:) In Castle Game Engine, I have a

Re: [fpc-pascal] GZip - Stream decompress only in memory

2016-09-04 Thread silvioprog
On Sep 4, 2016 5:29 PM, "Marcos Douglas" wrote: > > Ok, it works now. Great! > For the records, I've used the lib http://www.gocher.me/GZIP (Silvio's > tip) and the function Base64Decode from WST framework > http://svn.code.sf.net/p/lazarus-ccr/svn/wst/trunk/ > > For some

Re: [fpc-pascal] GZip - Stream decompress only in memory

2016-09-04 Thread Marcos Douglas
Ok, it works now. For the records, I've used the lib http://www.gocher.me/GZIP (Silvio's tip) and the function Base64Decode from WST framework http://svn.code.sf.net/p/lazarus-ccr/svn/wst/trunk/ For some reason the function DecodeBase64 from Synapse doesn't work. It receives an AnsiString.

Re: [fpc-pascal] Could someone explain me which the correct triggering of the BeforeDestruction method?

2016-09-04 Thread Luiz Americo Pereira Camara
Seems that Delphi considers that the object is already created at the time AfterConstruction is called, so it understands that when it gets into AfterConstruction is sucessfully created. Semantically makes sense. The counter proof is see if AfterConstruction is called when a exception occurs in

Re: [fpc-pascal] GZip - Stream decompress only in memory

2016-09-04 Thread Marcos Douglas
On Sun, Sep 4, 2016 at 4:46 PM, silvioprog wrote: > On Sun, Sep 4, 2016 at 1:08 PM, Marcos Douglas wrote: >> >> Hi, >> >> I have streams compressed using GZip. I get these streams from >> WebServices. >> So, how can I decompress these streams only in

Re: [fpc-pascal] GZip - Stream decompress only in memory

2016-09-04 Thread Marcos Douglas
On Sun, Sep 4, 2016 at 4:29 PM, José Mejuto wrote: > El 04/09/2016 a las 19:17, Marcos Douglas escribió: > >> try >> Buf.LoadFromFile('data.txt'); >> showmessage(inttostr(ExtractStream(Buf, Buf2))); //<< result is 0, ie, >> OK >> Buf2.SaveToFile('result.txt'); >

Re: [fpc-pascal] GZip - Stream decompress only in memory

2016-09-04 Thread José Mejuto
El 04/09/2016 a las 19:17, Marcos Douglas escribió: try Buf.LoadFromFile('data.txt'); showmessage(inttostr(ExtractStream(Buf, Buf2))); //<< result is 0, ie, OK Buf2.SaveToFile('result.txt'); There is no error, but Buf2 is empty. Hello, I'm not sure but I think that code at

Re: [fpc-pascal] GZip - Stream decompress only in memory

2016-09-04 Thread Marcos Douglas
On Sun, Sep 4, 2016 at 1:37 PM, Ewald wrote: > On 04/09/16 18:08, Marcos Douglas wrote: >> Hi, >> >> I have streams compressed using GZip. I get these streams from WebServices. >> So, how can I decompress these streams only in memory? > > Perhaps have a look at zlibar. The

Re: [fpc-pascal] GZip - Stream decompress only in memory

2016-09-04 Thread Ewald
On 04/09/16 18:08, Marcos Douglas wrote: > Hi, > > I have streams compressed using GZip. I get these streams from WebServices. > So, how can I decompress these streams only in memory? Perhaps have a look at zlibar. The main, and only, unit contains these functions: function

[fpc-pascal] GZip - Stream decompress only in memory

2016-09-04 Thread Marcos Douglas
Hi, I have streams compressed using GZip. I get these streams from WebServices. So, how can I decompress these streams only in memory? I've tried to use zstream unit, that contains TGZFileStream class. Unfortunately this class works only using files. Then I saved the stream in a file (data.txt)