An open API service indexing awesome lists of open source software.

https://github.com/aks-/base-256

encode and decode base256 encoding as gnu-tar does
https://github.com/aks-/base-256

gnu-tar tar

Last synced: 12 months ago
JSON representation

encode and decode base256 encoding as gnu-tar does

Awesome Lists containing this project

README

          

# base-256

encode and decode base256 encoding as gnu-tar does (supported range is -9007199254740991 to 9007199254740991).

```
npm install base-256
```

[![Build Status](https://travis-ci.org/aks-/base-256.svg?branch=master)](https://travis-ci.org/aks-/base-256)

## How it is different than buffer.writeInt32BE
It's a variable length encoding.

## Usage

``` js
const { encode, decode } = require('base-256')

const buf = new Buffer(12)
encode(buf, 2147483647)
// buf here is