23.1.6 • Published 6 months ago

@8zip/core v23.1.6

Weekly downloads
-
License
LGPL-3.0-only
Repository
-
Last release
6 months ago

@8zip/core

Simple wrapper around the 7zip binary

Usage

npm i @8zip/core
yarn add @8zip/core
pnpm add @8zip/core
const { extract, compress } = require('@8zip/core')

await extract('path/to/file.7z', 'path/to/extract/to', {
    /* 
       Whether to overwrite files when extracting
       The following options are supported:
       true | false | "renameExtracting" | "renameExisting"
       optional, defaults to true
    */
    overwrite: true,
    
    /*
        Path to the 7zip binary
        optional, defaults to the binary shipped with @8zip/bin
     */
    binary: 'path/to/@8zip/bin/dist/7z'
})

await compress('path/to/file.7z', 'path/to/compress', {
    /*
        Compression level (0-9)
        Higher levels result in smaller files, but take longer to compress
        optional, defaults to 6
     */
    level: 6,
    
    /*
        Path to the 7zip binary
        optional, defaults to the binary shipped with @8zip/bin
     */
    binary: 'path/to/@8zip/bin/dist/7z'
})
23.1.6

6 months ago

23.1.5

6 months ago

23.1.4

6 months ago

23.1.3

6 months ago

23.1.2

6 months ago

23.1.1

6 months ago

23.1.0

6 months ago