New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

jsonlz4-decompress

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jsonlz4-decompress

Decompress FireFox jsonlz4 bookmark backup files

latest
Source
npmnpm
Version
0.0.3
Version published
Weekly downloads
7
-12.5%
Maintainers
1
Weekly downloads
 
Created
Source

JSON lz4 Decompress

A Node.js module and CLI application for decompressing a Firefox bookmark backup jsonlz4 file format into JSON.

Node module

Installation

To install as a local module and include as a dependency:

npm install --save jsonlz4-decompress

Usage

var jsonlz4 = require('jsonlz4-decompress');
var fs = require('fs');

// Open file into buffer
fs.readFile('/path/to/bookmarkbackups/back-up-date.jsonlz4', function(err, fileBuffer) {
  // decompress file buffer to JSON
  decompressedJson = jsonlz4(fileBuffer);

  // do something with the JSON
  console.log(decompressedJson);
});

Commandline

Installation

To install as a command line application:

npm install jsonlz4-decompress -g

You may need to prefix the command with sudo.

Usage

  Usage: index [options] <file>

  Decompress a Firefox bookmark backup jsonlz4 file format into JSON.

  Options:

    -h, --help    output usage information
    -p, --pretty  Pretty print JSON

Output is sent to stdout

Technical stuff

Based on a description snippet found here

bytes 0-7: Magic number when converted to a string mozLz40 followed by a null charater.
bytes 8-11: Uncompressed file size. Little endian unsigned 32bit integer.
bytes 12-EOL: LZ4 compressed blocked.

Keywords

jsonlz4

FAQs

Package last updated on 29 Nov 2019

Did you know?

Socket

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