-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathindex.js
88 lines (75 loc) · 3.74 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
// Copyright (c) 2015 Uber Technologies, Inc.
//
// 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.
module.exports.fromBuffer = require('./interface').fromBuffer;
module.exports.byteLength = require('./interface').byteLength;
module.exports.toBuffer = require('./interface').toBuffer;
module.exports.intoBuffer = require('./interface').intoBuffer;
module.exports.fromBufferTuple = require('./interface').fromBufferTuple;
module.exports.byteLengthTuple = require('./interface').byteLengthTuple;
module.exports.toBufferTuple = require('./interface').toBufferTuple;
module.exports.intoBufferTuple = require('./interface').intoBufferTuple;
module.exports.fromBufferResult = require('./interface').fromBufferResult;
module.exports.byteLengthResult = require('./interface').byteLengthResult;
module.exports.toBufferResult = require('./interface').toBufferResult;
module.exports.intoBufferResult = require('./interface').intoBufferResult;
module.exports.formatError = require('./interface').formatError;
module.exports.Base = require('./base').BufferRW; // TODO: align names
module.exports.LengthResult = require('./base').LengthResult;
module.exports.WriteResult = require('./base').WriteResult;
module.exports.ReadResult = require('./base').ReadResult;
var atoms = require('./atoms');
module.exports.AtomRW = atoms.AtomRW;
module.exports.Int8 = atoms.Int8;
module.exports.Int16BE = atoms.Int16BE;
module.exports.Int32BE = atoms.Int32BE;
module.exports.Int16LE = atoms.Int16LE;
module.exports.Int32LE = atoms.Int32LE;
module.exports.UInt8 = atoms.UInt8;
module.exports.UInt16BE = atoms.UInt16BE;
module.exports.UInt32BE = atoms.UInt32BE;
module.exports.UInt16LE = atoms.UInt16LE;
module.exports.UInt32LE = atoms.UInt32LE;
module.exports.FloatLE = atoms.FloatLE;
module.exports.FloatBE = atoms.FloatBE;
module.exports.DoubleLE = atoms.DoubleLE;
module.exports.DoubleBE = atoms.DoubleBE;
module.exports.Null = require('./null');
module.exports.FixedWidth = require('./fixed_width_rw');
var VariableBuffer = require('./variable_buffer_rw');
var buf1 = VariableBuffer(atoms.UInt8);
var buf2 = VariableBuffer(atoms.UInt16BE);
module.exports.buf1 = buf1;
module.exports.buf2 = buf2;
module.exports.VariableBuffer = VariableBuffer;
var StringRW = require('./string_rw');
var varint = require('./varint');
var str1 = StringRW(atoms.UInt8, 'utf8');
var str2 = StringRW(atoms.UInt16BE, 'utf8');
var strn = StringRW(varint.unsigned, 'utf8');
module.exports.str1 = str1;
module.exports.str2 = str2;
module.exports.strn = strn;
module.exports.String = StringRW;
module.exports.varint = varint;
module.exports.Series = require('./series');
module.exports.Struct = require('./struct');
module.exports.Switch = require('./switch');
module.exports.Repeat = require('./repeat');
module.exports.Skip = require('./skip');