Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

png-datastream

A library that provides parser / serializer for PNG datastream that can be able to use in browser environment.

Build Status npm version Document Coverage

Installation

npm install png-datastream

Example

import Datastream from 'png-datastream';

// say you got `buf`, PNG ArrayBuffer from somewhere...
// parse ArrayBuffer as PNG datastream
const datastream = Datastream.fromArrayBuffer(buf);

datastream.signature; // PNG signature
datastream.chunks.forEach(chunk => { /* operation for each chunk */ });

const result = datastream.toArrayBuffer(); // serialize PNG datastream as ArrayBuffer

API Document

https://doc.esdoc.org/github.com/xKerman/png-datastream/

Development

# test
npm test
# check coding style
npm run eslint
# generate document
npm run esdoc

License

MIT License

About

A library that provides parser / serializer for PNG datastream

Resources

Packages

No packages published
You can’t perform that action at this time.