UNPKG

mongo-portable

Version:

Portable Pure JS MongoDB - Based on Monglodb (https://github.com/euforic/monglodb.git) by Christian Sullivan (http://RogueSynaptics.com)

166 lines (94 loc) 3.64 kB
[Mongo Portable](../README.md) > [BinaryParserBuffer](../classes/binaryparserbuffer.md) # Class: BinaryParserBuffer BinaryParserBuffer *__module__*: BinaryParserBuffer *__since__*: 0.0.1 *__author__*: Eduardo Astolfi [eastolfi91@gmail.com](mailto:eastolfi91@gmail.com) *__copyright__*: 2016 Eduardo Astolfi [eastolfi91@gmail.com](mailto:eastolfi91@gmail.com) *__license__*: MIT Licensed *__classdesc__*: BinaryParserBuffer - based on ([Binary Parser](http://jsfromhell.com/classes/binary-parser)) by Jonas Raoni Soares Silva ## Hierarchy **BinaryParserBuffer** ## Index ### Constructors * [constructor](binaryparserbuffer.md#constructor) ### Properties * [bigEndian](binaryparserbuffer.md#bigendian) * [buffer](binaryparserbuffer.md#buffer) * [logger](binaryparserbuffer.md#logger) ### Methods * [checkBuffer](binaryparserbuffer.md#checkbuffer) * [hasNeededBits](binaryparserbuffer.md#hasneededbits) * [readBits](binaryparserbuffer.md#readbits) * [setBuffer](binaryparserbuffer.md#setbuffer) --- ## Constructors <a id="constructor"></a> ### constructor**new BinaryParserBuffer**(bigEndian: *`any`*, buffer: * `string` &#124; `number`*): [BinaryParserBuffer](binaryparserbuffer.md) *Defined in [binary/BinaryParserBuffer.ts:21](https://github.com/EastolfiWebDev/MongoPortable/blob/d5d3826/src/binary/BinaryParserBuffer.ts#L21)* **Parameters:** | Param | Type | | ------ | ------ | | bigEndian | `any` | | buffer | `string` &#124; `number`| **Returns:** [BinaryParserBuffer](binaryparserbuffer.md) ___ ## Properties <a id="bigendian"></a> ### bigEndian **● bigEndian**: *`number`* *Defined in [binary/BinaryParserBuffer.ts:18](https://github.com/EastolfiWebDev/MongoPortable/blob/d5d3826/src/binary/BinaryParserBuffer.ts#L18)* ___ <a id="buffer"></a> ### buffer **● buffer**: *`any`[]* = [] *Defined in [binary/BinaryParserBuffer.ts:19](https://github.com/EastolfiWebDev/MongoPortable/blob/d5d3826/src/binary/BinaryParserBuffer.ts#L19)* ___ <a id="logger"></a> ### `<Protected>` logger **● logger**: *`JSWLogger`* *Defined in [binary/BinaryParserBuffer.ts:21](https://github.com/EastolfiWebDev/MongoPortable/blob/d5d3826/src/binary/BinaryParserBuffer.ts#L21)* ___ ## Methods <a id="checkbuffer"></a> ### checkBuffer**checkBuffer**(neededBits: *`any`*): `void` *Defined in [binary/BinaryParserBuffer.ts:57](https://github.com/EastolfiWebDev/MongoPortable/blob/d5d3826/src/binary/BinaryParserBuffer.ts#L57)* **Parameters:** | Param | Type | | ------ | ------ | | neededBits | `any` | **Returns:** `void` ___ <a id="hasneededbits"></a> ### hasNeededBits ▸ **hasNeededBits**(neededBits: *`any`*): `boolean` *Defined in [binary/BinaryParserBuffer.ts:53](https://github.com/EastolfiWebDev/MongoPortable/blob/d5d3826/src/binary/BinaryParserBuffer.ts#L53)* **Parameters:** | Param | Type | | ------ | ------ | | neededBits | `any` | **Returns:** `boolean` ___ <a id="readbits"></a> ### readBits**readBits**(start: *`number`*, length: *`number`*): `number` *Defined in [binary/BinaryParserBuffer.ts:63](https://github.com/EastolfiWebDev/MongoPortable/blob/d5d3826/src/binary/BinaryParserBuffer.ts#L63)* **Parameters:** | Param | Type | | ------ | ------ | | start | `number` | | length | `number` | **Returns:** `number` ___ <a id="setbuffer"></a> ### setBuffer ▸ **setBuffer**(data: *`string`*): `void` *Defined in [binary/BinaryParserBuffer.ts:35](https://github.com/EastolfiWebDev/MongoPortable/blob/d5d3826/src/binary/BinaryParserBuffer.ts#L35)* **Parameters:** | Param | Type | | ------ | ------ | | data | `string` | **Returns:** `void` ___