All Projects → mmoreram → extractor

mmoreram / extractor

Licence: MIT license
Compressed files extractor for PHP

Programming Languages

PHP
23972 projects - #3 most used programming language

Labels

Projects that are alternatives of or similar to extractor

MangDL
The most inefficient Manga downloader for PC
Stars: ✭ 40 (+73.91%)
Mutual labels:  zip, tar, rar
unarr
A decompression library for rar, tar, zip and 7z archives
Stars: ✭ 35 (+52.17%)
Mutual labels:  zip, tar, rar
ratarmount
Random Access Read-Only Tar Mount
Stars: ✭ 217 (+843.48%)
Mutual labels:  zip, tar, rar
Archiver
Easily create & extract archives, and compress & decompress files of various formats
Stars: ✭ 3,373 (+14565.22%)
Mutual labels:  zip, tar, rar
uncompress.js
Uncompress ZIP, RAR, and TAR files with pure JavaScript
Stars: ✭ 79 (+243.48%)
Mutual labels:  zip, tar, rar
comi
ComiGO:Simple, cross-platform manga reader。简单、跨平台的漫画阅读器。シンプルな漫画リーダー。
Stars: ✭ 34 (+47.83%)
Mutual labels:  zip, tar, rar
Libarchive
Multi-format archive and compression library
Stars: ✭ 1,625 (+6965.22%)
Mutual labels:  zip, tar, rar
lrkFM
Awesome, (ad) free, open source file manager for Android
Stars: ✭ 44 (+91.3%)
Mutual labels:  zip, rar
Unifiedarchive
UnifiedArchive - an archive manager with a unified way for different formats. Supports all basic (listing, reading, extracting and creation) and specific features (compression level, password-protection). Bundled with console program for working with archives.
Stars: ✭ 246 (+969.57%)
Mutual labels:  zip, tar
Bit7z
A C++ static library offering a clean and simple interface to the 7-zip DLLs.
Stars: ✭ 159 (+591.3%)
Mutual labels:  zip, tar
zipstream
A command line tool that allows you to easily share files and directories over the network
Stars: ✭ 49 (+113.04%)
Mutual labels:  zip, tar
Decompress
Extracting archives made easy
Stars: ✭ 316 (+1273.91%)
Mutual labels:  zip, tar
Leanify
lightweight lossless file minifier/optimizer
Stars: ✭ 694 (+2917.39%)
Mutual labels:  zip, tar
uncompress-react-native
Simple library to decompress files .zip, .rar, .cbz, .cbr in React Native.
Stars: ✭ 36 (+56.52%)
Mutual labels:  zip, rar
Swcompression
A Swift framework for working with compression, archives and containers.
Stars: ✭ 110 (+378.26%)
Mutual labels:  zip, tar
Ugrep
🔍NEW ugrep v3.1: ultra fast grep with interactive query UI and fuzzy search: search file systems, source code, text, binary files, archives (cpio/tar/pax/zip), compressed files (gz/Z/bz2/lzma/xz/lz4), documents and more. A faster, user-friendly and compatible grep replacement.
Stars: ✭ 626 (+2621.74%)
Mutual labels:  zip, tar
Sharpcompress
SharpCompress is a fully managed C# library to deal with many compression types and formats.
Stars: ✭ 1,397 (+5973.91%)
Mutual labels:  zip, tar
Node Archiver
a streaming interface for archive generation
Stars: ✭ 2,300 (+9900%)
Mutual labels:  zip, tar
Pyfilesystem2
Python's Filesystem abstraction layer
Stars: ✭ 1,256 (+5360.87%)
Mutual labels:  zip, tar
Afs
Abstract File Storage
Stars: ✭ 126 (+447.83%)
Mutual labels:  zip, tar

Extractor library for php

This library extracts your files from compressed packages and returns a Symfony Finder instance, ready to be managed

SensioLabsInsight License

Installing/Configuring

Tags

  • Use last unstable version ( alias of dev-master ) to stay in last commit
  • Use last stable version tag to stay in a stable release.
  • Latest Unstable Version Latest Stable Version

Installing Extractor

You have to add require line into you composer.json file

"require": {
    "php": ">=5.3.3",
    ...

    "mmoreram/extractor": "dev-master",
}

Then you have to use composer to update your project dependencies

$ curl -sS https://getcomposer.org/installer | php
$ php composer.phar update

Usage

Get a finder instance given a compressed file

<?php

use Symfony\Component\Finder\Finder;
use Mmoreram\Extractor\Filesystem\TemporaryDirectory;
use Mmoreram\Extractor\Resolver\ExtensionResolver;
use Mmoreram\Extractor\Extractor;

$temporaryDirectory = new TemporaryDirectory();
$extensionResolver = new ExtensionResolver;
$extractor = new Extractor(
    $temporaryDirectory,
    $extensionResolver
);

/**
 * @var Finder $files
 */
$files = $extractor->extractFromFile('/tmp/myfile.rar');
foreach ($files as $file) {

    echo $file->getRealpath() . PHP_EOL;
}

Adapters

This library currently manages these extensions. All of these adapters only works if the php extension is installed.

Directories

This library provide the way of working with temporary and specific directories.

Temporary directory

use Mmoreram\Extractor\Filesystem\TemporaryDirectory;
use Mmoreram\Extractor\Resolver\ExtensionResolver;
use Mmoreram\Extractor\Extractor;

$temporaryDirectory = new TemporaryDirectory();
$extensionResolver = new ExtensionResolver;
$extractor = new Extractor(
    $temporaryDirectory,
    $extensionResolver
);

Specific directory

use Mmoreram\Extractor\Filesystem\SpecificDirectory;
use Mmoreram\Extractor\Resolver\ExtensionResolver;
use Mmoreram\Extractor\Extractor;

$specificDirectory = new SpecificDirectory('/my/specific/path');
$extensionResolver = new ExtensionResolver;
$extractor = new Extractor(
    $specificDirectory,
    $extensionResolver
);
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].