Curso de PHP/Referência à linguagem/Funções de compressão

Funções PHP de compressão, são funções para PHP utilizadas para a manipulação de certos tipos de arquivos compactados.

Bzip2 editar

São funções PHP utilizadas para a manipulação de arquivos compactados do tipo Bzip2.

  • bzclose — Fecha um ponteiro de arquivo bzip2.
  • bzcompress — Comprime uma string em dados no formato bzip2.
  • bzdecompress — Descomprime dados no formato bzip2.
  • bzerrno — Retorna um número de erro do bzip2.
  • bzerror — Retorna o número e string de erro do bzip2 em um array.
  • bzerrstr — Retorna a string de erro do bzip2.
  • bzflush — Força a escrita de todos os dados que estão no buffer.
  • bzopen — Abre um arquivo comprimido com bzip2.
  • bzread — Leitura binary-safe de um arquivo bzip2.
  • bzwrite — Escrita binary-safe em um arquivo bzip2.

ZIP editar

São funções PHP utilizadas para a manipulação de arquivos compactados do tipo ZIP.

  • zip_close — Fecha um arquivo ZIP.
  • zip_entry_close — Fecha o arquivo que está aberto.
  • zip_entry_compressedsize — Recupera o tamanho compactado do arquivo que está dentro do arquivo ZIP.
  • zip_entry_compressionmethod — Recupera qual o método de compressão foi utilizado no arquivo.
  • zip_entry_filesize — Retorna o tamanho de um diretório de entrada.
  • zip_entry_name — Retorna o nome do arquivo.
  • zip_entry_open — Abre um arquivo do arquivo ZIP.
  • zip_entry_read — Lê de um arquivo aberto.
  • zip_open — Abre um arquivo ZIPado.
  • zip_read — Lê a próxima entrada em um arquivo ZIPado.
  • ZipArchive::addEmptyDir — Add a new directory.
  • ZipArchive::addFile — Adds a file to a ZIP archive from the given path.
  • ZipArchive::addFromString — Add a file to a ZIP archive using its contents.
  • ZipArchive::close — Close the active archive (opened or newly created).
  • ZipArchive::deleteIndex — delete an entry in the archive using its index.
  • ZipArchive::deleteName — delete an entry in the archive using its name.
  • ZipArchive::extractTo — Extract the archive contents.
  • ZipArchive::getArchiveComment — Returns the Zip archive comment.
  • ZipArchive::getCommentIndex — Returns the comment of an entry using the entry index.
  • ZipArchive::getCommentName — Returns the comment of an entry using the entry name.
  • ZipArchive::getFromIndex — Returns the entry contents using its index..
  • ZipArchive::getFromName — Returns the entry contents using its name..
  • ZipArchive::getNameIndex — Returns the name of an entry using its index.
  • ZipArchive::getStream — Get a file handler to the entry defined by its name (read only)..
  • ZipArchive::locateName — Returns the index of the entry in the archive.
  • ZipArchive::open — Open a ZIP file archive.
  • ZipArchive::renameIndex — Renames an entry defined by its index.
  • ZipArchive::renameName — Renames an entry defined by its name.
  • ZipArchive::setArchiveComment — Set the comment of a ZIP archive.
  • ZipArchive::setCommentIndex — Set the comment of an entry defined by its index.
  • ZipArchive::setCommentName — Set the comment of an entry defined by its name.
  • ZipArchive::statIndex — Get the details of an entry defined by its index..
  • ZipArchive::statName — Get the details of an entry defined by its name..
  • ZipArchive::unchangeAll — Undo all changes done in the archive..
  • ZipArchive::unchangeArchive — Revert all global changes done in the archive..
  • ZipArchive::unchangeIndex — Revert all changes done to an entry at the given index..
  • ZipArchive::unchangeName — Revert all changes done to an entry with the given name..

RAR editar

São funções PHP utilizadas para a manipulação de arquivos compactados do tipo RAR.

  • rar_close — Close Rar archive and free all resources.
  • rar_entry_get — Get entry object from the Rar archive.
  • rar_list — Get entries list from the Rar archive.
  • rar_open — Open Rar archive.
  • Rar::extract — Extract entry from the archive.
  • Rar::getAttr — Get attributes of the entry.
  • Rar::getCrc — Get CRC of the entry.
  • Rar::getFileTime — Get entry last modification time.
  • Rar::getHostOs — Get entry host OS.
  • Rar::getMethod — Get pack method of the entry.
  • Rar::getName — Get name of the entry.
  • Rar::getPackedSize — Get packed size of the entry.
  • Rar::getUnpackedSize — Get unpacked size of the entry.
  • Rar::getVersion — Get version of the archiver used to add the entry.

Fontes editar