UNPKG

apache-arrow

Version:
45 lines (43 loc) 1.49 kB
// automatically generated by the FlatBuffers compiler, do not modify import * as flatbuffers from 'flatbuffers'; export class FixedSizeBinary { constructor() { this.bb = null; this.bb_pos = 0; } __init(i, bb) { this.bb_pos = i; this.bb = bb; return this; } static getRootAsFixedSizeBinary(bb, obj) { return (obj || new FixedSizeBinary()).__init(bb.readInt32(bb.position()) + bb.position(), bb); } static getSizePrefixedRootAsFixedSizeBinary(bb, obj) { bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); return (obj || new FixedSizeBinary()).__init(bb.readInt32(bb.position()) + bb.position(), bb); } /** * Number of bytes per value */ byteWidth() { const offset = this.bb.__offset(this.bb_pos, 4); return offset ? this.bb.readInt32(this.bb_pos + offset) : 0; } static startFixedSizeBinary(builder) { builder.startObject(1); } static addByteWidth(builder, byteWidth) { builder.addFieldInt32(0, byteWidth, 0); } static endFixedSizeBinary(builder) { const offset = builder.endObject(); return offset; } static createFixedSizeBinary(builder, byteWidth) { FixedSizeBinary.startFixedSizeBinary(builder); FixedSizeBinary.addByteWidth(builder, byteWidth); return FixedSizeBinary.endFixedSizeBinary(builder); } } //# sourceMappingURL=fixed-size-binary.mjs.map