Socket
Socket
Sign inDemoInstall

@8zip/core

Package Overview
Dependencies
4
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @8zip/core

Opinionated 7-Zip executable wrapper for Node.js


Version published
Weekly downloads
2
increased by100%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

@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'
})

FAQs

Last updated on 21 Nov 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc