I want to compress a string in PHP and write it to a file without using the gzwrite function as I want to store the actual compressed string in a database first, but I am unsure as whether to use gzcompress
, gzencode
or gzdeflate
as it's not very clear.
Any ideas?
- Edit: the already compressed string will be written into a *.gz file from the database so it has to be compatible.