]>
Commit | Line | Data |
---|---|---|
1d09f67e TL |
1 | // <auto-generated> |
2 | // automatically generated by the FlatBuffers compiler, do not modify | |
3 | // </auto-generated> | |
4 | ||
5 | namespace Apache.Arrow.Flatbuf | |
6 | { | |
7 | ||
8 | using global::System; | |
9 | using global::FlatBuffers; | |
10 | ||
11 | /// Optional compression for the memory buffers constituting IPC message | |
12 | /// bodies. Intended for use with RecordBatch but could be used for other | |
13 | /// message types | |
14 | internal struct BodyCompression : IFlatbufferObject | |
15 | { | |
16 | private Table __p; | |
17 | public ByteBuffer ByteBuffer { get { return __p.bb; } } | |
18 | public static BodyCompression GetRootAsBodyCompression(ByteBuffer _bb) { return GetRootAsBodyCompression(_bb, new BodyCompression()); } | |
19 | public static BodyCompression GetRootAsBodyCompression(ByteBuffer _bb, BodyCompression obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); } | |
20 | public void __init(int _i, ByteBuffer _bb) { __p.bb_pos = _i; __p.bb = _bb; } | |
21 | public BodyCompression __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } | |
22 | ||
23 | /// Compressor library | |
24 | public CompressionType Codec { get { int o = __p.__offset(4); return o != 0 ? (CompressionType)__p.bb.GetSbyte(o + __p.bb_pos) : CompressionType.LZ4_FRAME; } } | |
25 | /// Indicates the way the record batch body was compressed | |
26 | public BodyCompressionMethod Method { get { int o = __p.__offset(6); return o != 0 ? (BodyCompressionMethod)__p.bb.GetSbyte(o + __p.bb_pos) : BodyCompressionMethod.BUFFER; } } | |
27 | ||
28 | public static Offset<BodyCompression> CreateBodyCompression(FlatBufferBuilder builder, | |
29 | CompressionType codec = CompressionType.LZ4_FRAME, | |
30 | BodyCompressionMethod method = BodyCompressionMethod.BUFFER) { | |
31 | builder.StartObject(2); | |
32 | BodyCompression.AddMethod(builder, method); | |
33 | BodyCompression.AddCodec(builder, codec); | |
34 | return BodyCompression.EndBodyCompression(builder); | |
35 | } | |
36 | ||
37 | public static void StartBodyCompression(FlatBufferBuilder builder) { builder.StartObject(2); } | |
38 | public static void AddCodec(FlatBufferBuilder builder, CompressionType codec) { builder.AddSbyte(0, (sbyte)codec, 0); } | |
39 | public static void AddMethod(FlatBufferBuilder builder, BodyCompressionMethod method) { builder.AddSbyte(1, (sbyte)method, 0); } | |
40 | public static Offset<BodyCompression> EndBodyCompression(FlatBufferBuilder builder) { | |
41 | int o = builder.EndObject(); | |
42 | return new Offset<BodyCompression>(o); | |
43 | } | |
44 | }; | |
45 | ||
46 | ||
47 | } |