L
L
Lander2015-08-10 13:36:35
PHP
Lander, 2015-08-10 13:36:35

Is it possible to pack and unpack a string on the fly?

Good afternoon.
I googled for extensions for archiving data on the fly, but everything I found works only through files. The task is as follows: there is a long line of text, I would like to compress it using the zip algorithm or any other. But bypass file operations, but something like:

$archive = zipPack($data); //упаковка
$data = zipUnPack($archive); //распаковка

Are there ready-made extensions and functions for php or with files to dress up?
Thanks in advance to all who answer.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Z
Zelimkhan Beltoev, 2015-08-10
@usdglander

php.net/manual/ru/function.bzcompress.php
php.net/manual/ru/function.gzencode.php

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question