Socket
Socket
Sign inDemoInstall

@ably/vcdiff-decoder

Package Overview
Dependencies
0
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @ably/vcdiff-decoder

Pure JavaScript vcdiff decoder that works with binary deltas from Google's open-vcdiff


Version published
Weekly downloads
928
increased by7.28%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

vcdiff-decoder

Build Status

Pure JavaScript vcdiff decoder. Tested and proven working with vcdiff patch/delta files generated from Google's open-vcdiff and xdelta

const vcdiff = require('vcdiff-decoder');

let target = vcdiff.decodeSync(deltaBuffer, new Buffer('some dictionary string buffer'));
console.log(target.toString());

API

vcdiff.decodeSync(delta, source)

  • delta Buffer
  • source Buffer

Returns a Buffer object of the target.

delta is the binary encoding of the information needed to transform the source to the target. It is encoded as vcdiff, as specified in RFC 3284

source is the group of bytes to transform into the target. In delta encoding, this probably an old, cached version.

vcdiff.decode(delta, source)

Same as above except returns a Promise that either resolves with the target Buffer or rejects with an error.

Release checklist

  1. Run grunt release:<type> (where type is "major", "minor", "patch", "prepatch")
  2. Run grunt release:deploy
  3. Visit https://github.com/ably-forks/vcdiff-decoder/tags and draft new release for the newly created tag

Keywords

FAQs

Last updated on 29 Jul 2019

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