apache-arrow
Version:
Apache Arrow columnar in-memory format
45 lines (43 loc) • 1.23 kB
JavaScript
// automatically generated by the FlatBuffers compiler, do not modify
export class Block {
constructor() {
this.bb = null;
this.bb_pos = 0;
}
__init(i, bb) {
this.bb_pos = i;
this.bb = bb;
return this;
}
/**
* Index to the start of the RecordBlock (note this is past the Message header)
*/
offset() {
return this.bb.readInt64(this.bb_pos);
}
/**
* Length of the metadata
*/
metaDataLength() {
return this.bb.readInt32(this.bb_pos + 8);
}
/**
* Length of the data (this is aligned so there can be a gap between this and
* the metadata).
*/
bodyLength() {
return this.bb.readInt64(this.bb_pos + 16);
}
static sizeOf() {
return 24;
}
static createBlock(builder, offset, metaDataLength, bodyLength) {
builder.prep(8, 24);
builder.writeInt64(BigInt(bodyLength !== null && bodyLength !== void 0 ? bodyLength : 0));
builder.pad(4);
builder.writeInt32(metaDataLength);
builder.writeInt64(BigInt(offset !== null && offset !== void 0 ? offset : 0));
return builder.offset();
}
}
//# sourceMappingURL=block.mjs.map