File size: 1,119 Bytes
78c921d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
// automatically generated by the FlatBuffers compiler, do not modify

import * as flatbuffers from 'flatbuffers';

export class Block {
  bb: flatbuffers.ByteBuffer|null = null;
  bb_pos = 0;
__init(i:number, bb:flatbuffers.ByteBuffer):Block {
  this.bb_pos = i;
  this.bb = bb;
  return this;
}

/**
 * Index to the start of the RecordBlock (note this is past the Message header)
 */
offset():flatbuffers.Long {
  return this.bb!.readInt64(this.bb_pos);
}

/**
 * Length of the metadata
 */
metaDataLength():number {
  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():flatbuffers.Long {
  return this.bb!.readInt64(this.bb_pos + 16);
}

static sizeOf():number {
  return 24;
}

static createBlock(builder:flatbuffers.Builder, offset: flatbuffers.Long, metaDataLength: number, bodyLength: flatbuffers.Long):flatbuffers.Offset {
  builder.prep(8, 24);
  builder.writeInt64(bodyLength);
  builder.pad(4);
  builder.writeInt32(metaDataLength);
  builder.writeInt64(offset);
  return builder.offset();
}

}