npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@gregoriusrippenstein/node-red-contrib-tarball

v0.1.0

Published

Create tar files and extract tarballs in xz and gzip formats

Downloads

17

Readme

Tarball

Create and extract tar archive files.

Usage

This node can extract and create tar files, it does this depending on the msg.payload:

  • if the payload is an array, assume that a tarball should be created
  • if the payload is an object then assume the payload is a Buffer to be extracted

Extraction

Extraction generates a message per file found and a final message with complete = true is sent once the file has been completely extracted. The payload of the final complete message is an array of all files extracted.

This behaviour allows this node to be connected to a join node in manual mode.

Extraction assumes that the msg.payload is an Buffer with the contents of the tarball. Either encoded in xz format, gzip format or non-encoded tar archive.

A message is generated for each file that is extracted. All data is encoded in a Buffer object as it is not possible to distinguish between binary content and text content. The message has a path attribute for the file name and payload contains the buffer with the files contents.

Once all files have been extracted, one file message is sent that contains complete set to true and payload being an array containing all files that were extracted. Each file is represented by a hash object:

{
  path: "full path of file",
  payload: Buffer.from("object containing file contents in Buffer form")
}

Compression

For compression, msg.payload is assumed to be an array containing objects of the form:

{
  path: "full/path/in/tar/file.txt",
  payload: Buffer.from("file contents"),
}

Payload is assumed to be a Buffer object. If path is not defined, the entry is ignored.

Returned is a tar archive which can then be compressed using Lzma or Gzip.

Artifacts