{"_id":"microbuffer","_rev":"2864688","name":"microbuffer","description":"Light implementation of binary buffer with helpers for easy access.","dist-tags":{"latest":"1.0.0"},"maintainers":[{"name":"vitaly","email":"vitaly@rcdesign.ru"}],"time":{"modified":"2022-09-14T03:07:41.000Z","created":"2015-04-11T23:40:51.755Z","1.0.0":"2015-04-11T23:40:51.755Z"},"users":{},"repository":{"type":"git","url":"https://github.com/fontello/microbuffer"},"versions":{"1.0.0":{"name":"microbuffer","version":"1.0.0","description":"Light implementation of binary buffer with helpers for easy access.","keywords":["buffer"],"repository":{"type":"git","url":"https://github.com/fontello/microbuffer"},"license":"MIT","devDependencies":{"eslint":"0.18.0","eslint-plugin-nodeca":"^1.0.3","lodash":"*","mocha":"^2.2.4"},"scripts":{"test":"make test"},"gitHead":"7bc8aa466dfcd4779921709c64f4a5122ec4b4f0","bugs":{"url":"https://github.com/fontello/microbuffer/issues"},"homepage":"https://github.com/fontello/microbuffer","_id":"microbuffer@1.0.0","_shasum":"8b3832ed40c87d51f47bb234913a698a756d19d2","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"vitaly","email":"vitaly@rcdesign.ru"},"maintainers":[{"name":"vitaly","email":"vitaly@rcdesign.ru"}],"dist":{"shasum":"8b3832ed40c87d51f47bb234913a698a756d19d2","size":5721,"noattachment":false,"key":"/microbuffer/-/microbuffer-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/microbuffer/download/microbuffer-1.0.0.tgz"},"directories":{},"publish_time":1428795651755,"_hasShrinkwrap":false,"_cnpm_publish_time":1428795651755,"_cnpmcore_publish_time":"2021-12-16T21:39:43.550Z"}},"readme":"microbuffer\n===========\n\n[![Build Status](https://img.shields.io/travis/fontello/microbuffer/master.svg?style=flat)](https://travis-ci.org/fontello/microbuffer)\n[![NPM version](https://img.shields.io/npm/v/microbuffer.svg?style=flat)](https://www.npmjs.org/package/microbuffer)\n\n> Light implementation of binary buffer with helpers for easy access.\n\nThis library was written for fontello's font convertors -\n[svg2ttf](https://github.com/fontello/svg2ttf)\n[ttf2woff](https://github.com/fontello/ttf2woff)\n[ttf2eot](https://github.com/fontello/ttf2eot). Main features are:\n- good speed & compact size (no dependencies)\n- transparent typed arrays support in browsers\n- methods to simplify binary data read/write\n\n\nAPI\n---\n\n### Constructor\n\n- `new MicroBuffer(microbuffer [, offset, length])` - wrap MicroBuffer\n  instanse, sharing the same data.\n- `new MicroBuffer(Uint8Array|Array [, offset, length])` - wrap Uint8Array|Array.\n- `new MicroBuffer(size)` - create new MicroBuffer of specified size.\n\n### Methods\n\n- `.getUint8(pos)`\n- `.getUint16(pos, littleEndian)`\n- `.getUint32(pos, littleEndian)`\n- `.setUint8(pos, value)`\n- `.setUint16(pos, value, littleEndian)`\n- `.setUint32(pos, value, littleEndian)`\n\nWith position update:\n\n- `.writeUint8(value)`\n- `.writeInt8(value)`\n- `.writeUint16(value, littleEndian)`\n- `.writeInt16(value, littleEndian)`\n- `.writeUint32(value, littleEndian)`\n- `.writeInt32(value, littleEndian)`\n- `.writeUint64(value)`\n\nOther:\n\n- `.seek(pos)`\n- `.fill(value)`\n- `.writeBytes(Uint8Array|Array)`\n- `.toString()`\n- `.toArray()`\n","_attachments":{},"homepage":"https://github.com/fontello/microbuffer","bugs":{"url":"https://github.com/fontello/microbuffer/issues"},"license":"MIT"}