binary-data-types
https://github.com/rochars/binary-data-types
Binary data types definitions.
Install
npm install binary-data-types
Use
Node
const BinaryDataTypes = require('binary-data-types');
console.log(BinaryDataTypes.uInt8);
Browser
Use the minified file in the /dist folder:
<script src="binary-data-types.min.js"></script>
<script>
console.log(BinaryDataTypes.uInt8);
</script>
Or get it from the jsDelivr CDN:
<script src="https://cdn.jsdelivr.net/npm/binary-data-types"></script>
Or get it from unpkg:
<script src="https://unpkg.com/binary-data-types"></script>
Or as a module from jspm:
<script type="module">
import BinaryDataTypes from 'https://dev.jspm.io/binary-data-types';
console.log(BinaryDataTypes.uInt8);
</script>
Types
8-bit or less:
- int2
- uInt2
- int4
- uInt4
- int8
- uInt8
little-endian
- int16
- uInt16
- float16
- int24
- uInt24
- int32
- uInt32
- float32
- int40
- uInt40
- int48
- uInt48
- float64
big-endian:
- int16BE
- uInt16BE
- float16BE
- int24BE
- uInt24BE
- int32BE
- uInt32BE
- float32BE
- int40BE
- uInt40BE
- int48BE
- uInt48BE
- float64BE
LICENSE
Copyright (c) 2018 Rafael da Silva Rocha.
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.