Socket
Socket
Sign inDemoInstall

@bytedo/gzip

Package Overview
Dependencies
0
Maintainers
2
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @bytedo/gzip

浏览器端的gzip库, fork于pako, 仅调整语法为esm, 并只保留gzip的导出。


Version published
Weekly downloads
0
Maintainers
2
Created
Weekly downloads
 

Readme

Source

@bytedo/gzip

浏览器端的gzip库, fork于pako, 仅调整语法为esm, 并只保留gzip的导出。

版本同步状态:

pako: pako

@bytedo/gzip: @bytedo/gzip

安装&使用

npm install @bytedo/gzip

或直接使用cdn地址:


import { gzip , gunzip } from '@bytedo/gzip' // use importmap
// or
import { gzip , gunzip } from '//jscdn.ink/@bytedo/gzip/latest/index.js'

// 也可以单独引入
import { gzip } from '//jscdn.ink/@bytedo/gzip/latest/gzip.js'
import { gunzip } from '//jscdn.ink/@bytedo/gzip/latest/gunzip.js'


let base64Str = gzip('hello world')  // return base64 string

let txt = gunzip(base64Str) // return hello world

开源协议

  • MIT - 除 /lib/zlib 目录以外的所有文件
  • ZLIB - /lib/zlib 目录

Keywords

FAQs

Last updated on 29 May 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