Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
nodejs toBytes and fromBytes conversion
CoffeeScript
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib bump 1.2.0 - fix buffer from int string
test
README.md
index.coffee
package.json

README.md

Byter

Byte from/to conversion library for String, Int, Long Support joining bytes

Usage

Install npm install byter

Require byter = require 'byter'

String

byter.stringToBytes "test"
byter.bytesToString bytes

Long

byter.longToBytes "9223372036854775807"
byter.bytesToLong bytes

Int

byter.intToBytes 10
byter.intToBytes "10"
byter.bytesToInt bytes

Float

byter.floatToBytes 1.234
byter.floatToBytes "1.234"
byter.bytesToFloat bytes

Join bytes

a = byter.intToBytes 10
aa = byter.intToBytes "10"
byter.join a, aa, ...

Support for Hbase Phoenix v 3.0.0 data types

a = byter.phoenix.intToBytes 10
a = byter.phoenix.unsignedIntToBytes 10
a = byter.phoenix.longToBytes "-1387547769370"
a = byter.phoenix.dateToBytes "1387547769370" #micro timestamp
a = byter.phoenix.unsignedLongToBytes "1387547769370"
#write a to hbase
Something went wrong with that request. Please try again.