Search
Preparing search index...
The search index is not available
@osmium/coder
Options
All
Public
Public/Protected
All
Inherited
Externals
Menu
@osmium/coder
CoderTools
Class CoderTools
Hierarchy
CoderTools
Index
Constructors
constructor
Properties
BASE_
ALPHABETS
Methods
base16
Decode
base16
Encode
base32
Decode
base32
Encode
base36
Decode
base36
Encode
base58
Decode
base58
Encode
base62
Decode
base62
Encode
base64
Decode
base64
Encode
base66
Decode
base66
Encode
baseXDecode
baseXEncode
bin
Flags
To
Buf
buf
To
Bin
Flags
buf
To
Double
buf
To
Float
buf
To
Int
buf
To
Int16
buf
To
Int16U
buf
To
Int32
buf
To
Int32U
buf
To
Int8
buf
To
Int8U
crc32
double
To
Buf
float
To
Buf
hex
To
Bin
Str
int16
To
Buf
int16UTo
Buf
int32
To
Buf
int32UTo
Buf
int53to
Two
Int32
int8
To
Buf
int8UTo
Buf
int
To
Buf
is
Buffer
makeWBuffer
pad
to
Buffer
two
Int32to
Int53
Constructors
constructor
new
Coder
Tools
(
)
:
CoderTools
Returns
CoderTools
Properties
Static
BASE_
ALPHABETS
BASE_
ALPHABETS
:
{
BASE16
:
string
;
BASE36
:
string
;
BASE58
:
string
;
BASE62
:
string
;
BASE66
:
string
}
= ...
Type declaration
BASE16
:
string
BASE36
:
string
BASE58
:
string
BASE62
:
string
BASE66
:
string
Methods
Static
base16
Decode
base16
Decode
(
what
:
string
, asBuffer
?:
boolean
, asAscii
?:
boolean
)
:
string
|
Buffer
Parameters
what:
string
asBuffer:
boolean
= false
asAscii:
boolean
= false
Returns
string
|
Buffer
Static
base16
Encode
base16
Encode
(
what
:
string
|
Buffer
, asAscii
?:
boolean
)
:
string
Parameters
what:
string
|
Buffer
asAscii:
boolean
= false
Returns
string
Static
base32
Decode
base32
Decode
(
what
:
string
, asBuffer
?:
boolean
, asAscii
?:
boolean
)
:
string
|
Buffer
|
Uint8Array
Parameters
what:
string
asBuffer:
boolean
= false
asAscii:
boolean
= false
Returns
string
|
Buffer
|
Uint8Array
Static
base32
Encode
base32
Encode
(
what
:
string
|
Buffer
, asAscii
?:
boolean
)
:
string
Parameters
what:
string
|
Buffer
asAscii:
boolean
= false
Returns
string
Static
base36
Decode
base36
Decode
(
what
:
string
, asBuffer
?:
boolean
, asAscii
?:
boolean
)
:
string
|
Buffer
Parameters
what:
string
asBuffer:
boolean
= false
asAscii:
boolean
= false
Returns
string
|
Buffer
Static
base36
Encode
base36
Encode
(
what
:
string
|
Buffer
, asAscii
?:
boolean
)
:
string
Parameters
what:
string
|
Buffer
asAscii:
boolean
= false
Returns
string
Static
base58
Decode
base58
Decode
(
what
:
string
, asBuffer
?:
boolean
, asAscii
?:
boolean
)
:
string
|
Buffer
|
Uint8Array
Parameters
what:
string
asBuffer:
boolean
= false
asAscii:
boolean
= false
Returns
string
|
Buffer
|
Uint8Array
Static
base58
Encode
base58
Encode
(
what
:
string
|
Buffer
, asAscii
?:
boolean
)
:
string
Parameters
what:
string
|
Buffer
asAscii:
boolean
= false
Returns
string
Static
base62
Decode
base62
Decode
(
what
:
string
, asBuffer
?:
boolean
, asAscii
?:
boolean
)
:
string
|
Buffer
Parameters
what:
string
asBuffer:
boolean
= false
asAscii:
boolean
= false
Returns
string
|
Buffer
Static
base62
Encode
base62
Encode
(
what
:
string
|
Buffer
, asAscii
?:
boolean
)
:
string
Parameters
what:
string
|
Buffer
asAscii:
boolean
= false
Returns
string
Static
base64
Decode
base64
Decode
(
what
:
string
, asBuffer
?:
boolean
, asAscii
?:
boolean
)
:
string
|
Buffer
|
Uint8Array
Parameters
what:
string
asBuffer:
boolean
= false
asAscii:
boolean
= false
Returns
string
|
Buffer
|
Uint8Array
Static
base64
Encode
base64
Encode
(
what
:
string
|
Buffer
, asAscii
?:
boolean
)
:
string
Parameters
what:
string
|
Buffer
asAscii:
boolean
= false
Returns
string
Static
base66
Decode
base66
Decode
(
what
:
string
, asBuffer
?:
boolean
, asAscii
?:
boolean
)
:
string
|
Buffer
Parameters
what:
string
asBuffer:
boolean
= false
asAscii:
boolean
= false
Returns
string
|
Buffer
Static
base66
Encode
base66
Encode
(
what
:
string
|
Buffer
, asAscii
?:
boolean
)
:
string
Parameters
what:
string
|
Buffer
asAscii:
boolean
= false
Returns
string
Static
baseXDecode
baseXDecode
(
what
:
string
, base
:
string
, asBuffer
?:
boolean
, asAscii
?:
boolean
)
:
string
|
Buffer
Parameters
what:
string
base:
string
asBuffer:
boolean
= false
asAscii:
boolean
= false
Returns
string
|
Buffer
Static
baseXEncode
baseXEncode
(
what
:
string
|
Buffer
, base
:
string
, asAscii
?:
boolean
)
:
string
Parameters
what:
string
|
Buffer
base:
string
asAscii:
boolean
= false
Returns
string
Static
bin
Flags
To
Buf
bin
Flags
To
Buf
(
arr
:
boolean
[]
)
:
Buffer
Parameters
arr:
boolean
[]
Returns
Buffer
Static
buf
To
Bin
Flags
buf
To
Bin
Flags
(
buf
:
number
|
Buffer
, offset
?:
number
)
:
Boolean
[]
Parameters
buf:
number
|
Buffer
offset:
number
= 0
Returns
Boolean
[]
Static
buf
To
Double
buf
To
Double
(
buf
:
Buffer
, offset
?:
number
, be
?:
boolean
)
:
number
Parameters
buf:
Buffer
offset:
number
= 0
be:
boolean
= false
Returns
number
Static
buf
To
Float
buf
To
Float
(
buf
:
Buffer
, offset
?:
number
, be
?:
boolean
)
:
number
Parameters
buf:
Buffer
offset:
number
= 0
be:
boolean
= false
Returns
number
Static
buf
To
Int
buf
To
Int
(
buf
:
Buffer
, len
?:
number
, offset
?:
number
, be
?:
boolean
)
:
number
Parameters
buf:
Buffer
len:
number
= 7
offset:
number
= 0
be:
boolean
= false
Returns
number
Static
buf
To
Int16
buf
To
Int16
(
buf
:
Buffer
, offset
?:
number
, be
?:
boolean
)
:
number
Parameters
buf:
Buffer
offset:
number
= 0
be:
boolean
= false
Returns
number
Static
buf
To
Int16U
buf
To
Int16U
(
buf
:
Buffer
, offset
?:
number
, be
?:
boolean
)
:
number
Parameters
buf:
Buffer
offset:
number
= 0
be:
boolean
= false
Returns
number
Static
buf
To
Int32
buf
To
Int32
(
buf
:
Buffer
, offset
?:
number
, be
?:
boolean
)
:
number
Parameters
buf:
Buffer
offset:
number
= 0
be:
boolean
= false
Returns
number
Static
buf
To
Int32U
buf
To
Int32U
(
buf
:
Buffer
, offset
?:
number
, be
?:
boolean
)
:
number
Parameters
buf:
Buffer
offset:
number
= 0
be:
boolean
= false
Returns
number
Static
buf
To
Int8
buf
To
Int8
(
buf
:
Buffer
, offset
?:
number
)
:
number
Parameters
buf:
Buffer
offset:
number
= 0
Returns
number
Static
buf
To
Int8U
buf
To
Int8U
(
buf
:
Buffer
, offset
?:
number
)
:
number
Parameters
buf:
Buffer
offset:
number
= 0
Returns
number
Static
crc32
crc32
(
data
:
string
|
Buffer
|
Uint8Array
, previous
?:
number
)
:
number
Parameters
data:
string
|
Buffer
|
Uint8Array
previous:
number
= 0
Returns
number
Static
double
To
Buf
double
To
Buf
(
int
:
number
, be
?:
boolean
)
:
Buffer
Parameters
int:
number
be:
boolean
= false
Returns
Buffer
Static
float
To
Buf
float
To
Buf
(
int
:
number
, be
?:
boolean
)
:
Buffer
Parameters
int:
number
be:
boolean
= false
Returns
Buffer
Static
hex
To
Bin
Str
hex
To
Bin
Str
(
val
:
string
)
:
string
Parameters
val:
string
Returns
string
Static
int16
To
Buf
int16
To
Buf
(
int
:
number
, be
?:
boolean
)
:
Buffer
Parameters
int:
number
be:
boolean
= false
Returns
Buffer
Static
int16UTo
Buf
int16UTo
Buf
(
int
:
number
, be
?:
boolean
)
:
Buffer
Parameters
int:
number
be:
boolean
= false
Returns
Buffer
Static
int32
To
Buf
int32
To
Buf
(
int
:
number
, be
?:
boolean
)
:
Buffer
Parameters
int:
number
be:
boolean
= false
Returns
Buffer
Static
int32UTo
Buf
int32UTo
Buf
(
int
:
number
, be
?:
boolean
)
:
Buffer
Parameters
int:
number
be:
boolean
= false
Returns
Buffer
Static
int53to
Two
Int32
int53to
Two
Int32
(
val
:
number
)
:
[
number
,
number
]
Parameters
val:
number
Returns
[
number
,
number
]
Static
int8
To
Buf
int8
To
Buf
(
int
:
number
)
:
Buffer
Parameters
int:
number
Returns
Buffer
Static
int8UTo
Buf
int8UTo
Buf
(
int
:
number
)
:
Buffer
Parameters
int:
number
Returns
Buffer
Static
int
To
Buf
int
To
Buf
(
int
:
number
, len
?:
number
, be
?:
boolean
)
:
Buffer
Parameters
int:
number
len:
number
= 7
be:
boolean
= false
Returns
Buffer
Static
is
Buffer
is
Buffer
(
what
:
any
)
:
boolean
Parameters
what:
any
Returns
boolean
Static
makeWBuffer
makeWBuffer
(
cb
:
(
arg
:
Buffer
)
=>
void
, length
:
number
)
:
Buffer
Parameters
cb:
(
arg
:
Buffer
)
=>
void
(
arg
:
Buffer
)
:
void
Parameters
arg:
Buffer
Returns
void
length:
number
Returns
Buffer
Static
pad
pad
(
str
:
string
|
number
, z
?:
number
)
:
string
Parameters
str:
string
|
number
z:
number
= 8
Returns
string
Static
to
Buffer
to
Buffer
(
what
:
string
|
Buffer
, ascii
?:
boolean
)
:
Buffer
Parameters
what:
string
|
Buffer
ascii:
boolean
= false
Returns
Buffer
Static
two
Int32to
Int53
two
Int32to
Int53
(
val
:
[
number
,
number
]
)
:
number
Parameters
val:
[
number
,
number
]
Returns
number
Exports
Internals
Externals
o
Tools
Coder
Tools
constructor
BASE_
ALPHABETS
base16
Decode
base16
Encode
base32
Decode
base32
Encode
base36
Decode
base36
Encode
base58
Decode
base58
Encode
base62
Decode
base62
Encode
base64
Decode
base64
Encode
base66
Decode
base66
Encode
baseXDecode
baseXEncode
bin
Flags
To
Buf
buf
To
Bin
Flags
buf
To
Double
buf
To
Float
buf
To
Int
buf
To
Int16
buf
To
Int16U
buf
To
Int32
buf
To
Int32U
buf
To
Int8
buf
To
Int8U
crc32
double
To
Buf
float
To
Buf
hex
To
Bin
Str
int16
To
Buf
int16UTo
Buf
int32
To
Buf
int32UTo
Buf
int53to
Two
Int32
int8
To
Buf
int8UTo
Buf
int
To
Buf
is
Buffer
makeWBuffer
pad
to
Buffer
two
Int32to
Int53
Generated using
TypeDoc