Skip to main content

PCLZip: comprimere e decomprimere in PHP

dafi's picture
Posted in
Ci sono decine di librerie PHP per svolgere operazioni di zip e unzip ma di quelle che ho provato sino ad oggi nessuna mi soddisfaceva pienamente. Adesso ho trovato quella che mi sembra il ragionevole compromesso tra prestazioni e semplicita'. La stiamo usando su Babelzilla che ha un carico medio e si sta comportando egregiamente. La libreria e' PCLZip ed e' interamente scritta in PHP, espone pochi metodi ma che permettono di fare tutto. Ho trovato comodissima la possibilita' di decomprimere un solo file direttamente in RAM, operazione che dovevo fare frequentemente sui file chrome.manifest e install.rdf. $chrome = $xpi->extract(PCLZIP_OPT_EXTRACT_AS_STRING, PCLZIP_OPT_BY_NAME, 'chrome.manifest');

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • You can use BBCode tags in the text.

More information about formatting options

Type the characters you see in this picture. (verify using audio)
Type the characters you see in the picture above; if you can't read them, submit the form and a new image will be generated. Not case sensitive.
Syndicate content