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
- Host: GitHub
- URL: https://github.com/aks-/base-256
- Owner: aks-
- License: mit
- Created: 2018-04-20T09:15:54.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-05-02T11:21:37.000Z (about 8 years ago)
- Last Synced: 2025-06-01T20:45:31.274Z (about 1 year ago)
- Topics: gnu-tar, tar
- Language: JavaScript
- Homepage:
- Size: 27.3 KB
- Stars: 10
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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
```
[](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