Network compression

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Network compression

Free Pascal - General mailing list
Hi,

   I need to transfer data which are relative big ( 1,2 GB )using low
memory ( 512MB, 1GB RAM ) machines.

   I was thinking something like load partial the file I ie.e a 64K
memory block ) compress it send that compressed block via network and at
the other end receive that block decompressed it and write it to disk,
"repeat until done" .

   I've searched but I didn't find any example on how to compress /
decompress in blocks .

   Any hints ?

regards,

--
Dimitrios Chr. Ioannidis
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Network compression

Graeme Geldenhuys-6
On 2017-05-23 09:52, Dimitrios Chr. Ioannidis via fpc-pascal wrote:
>    I've searched but I didn't find any example on how to compress /
> decompress in blocks .

Take a look at how it is done in tiOPF. The unit is pretty stand-alone,
so you don’t need to use the rest of tiOPF to make use of this unit.

 
https://sourceforge.net/p/tiopf/code/ci/tiopf2/tree/Options/tiCompressZLib.pas

The code should be self explanatory. There is even a tiCompressNone.pas
which is great for testing purposes.

If you still don’t know how to use the unit, take a look at the unit
tests, in the “UnitTests” directory, for detailed usage examples.

Regards,
   Graeme

--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

My public PGP key:  http://tinyurl.com/graeme-pgp
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Network compression

Adriaan van Os-2
In reply to this post by Free Pascal - General mailing list
Dimitrios Chr. Ioannidis via fpc-pascal wrote:
> Hi,
>
>   I need to transfer data which are relative big ( 1,2 GB )using low
> memory ( 512MB, 1GB RAM ) machines.

The fastest compressor to do the job is LZ4 <https://github.com/lz4/lz4>.

Regards,

Adriaan van Os

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Loading...