All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.apache.arrow.flatbuf.BodyCompression Maven / Gradle / Ivy

There is a newer version: 17.0.0
Show newest version
// automatically generated by the FlatBuffers compiler, do not modify

package org.apache.arrow.flatbuf;

import java.nio.*;
import java.lang.*;
import java.util.*;
import com.google.flatbuffers.*;

@SuppressWarnings("unused")
/**
 * Optional compression for the memory buffers constituting IPC message
 * bodies. Intended for use with RecordBatch but could be used for other
 * message types
 */
public final class BodyCompression extends Table {
  public static BodyCompression getRootAsBodyCompression(ByteBuffer _bb) { return getRootAsBodyCompression(_bb, new BodyCompression()); }
  public static BodyCompression getRootAsBodyCompression(ByteBuffer _bb, BodyCompression obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); }
  public void __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; }
  public BodyCompression __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }

  /**
   * Compressor library
   */
  public byte codec() { int o = __offset(4); return o != 0 ? bb.get(o + bb_pos) : 0; }
  /**
   * Indicates the way the record batch body was compressed
   */
  public byte method() { int o = __offset(6); return o != 0 ? bb.get(o + bb_pos) : 0; }

  public static int createBodyCompression(FlatBufferBuilder builder,
      byte codec,
      byte method) {
    builder.startObject(2);
    BodyCompression.addMethod(builder, method);
    BodyCompression.addCodec(builder, codec);
    return BodyCompression.endBodyCompression(builder);
  }

  public static void startBodyCompression(FlatBufferBuilder builder) { builder.startObject(2); }
  public static void addCodec(FlatBufferBuilder builder, byte codec) { builder.addByte(0, codec, 0); }
  public static void addMethod(FlatBufferBuilder builder, byte method) { builder.addByte(1, method, 0); }
  public static int endBodyCompression(FlatBufferBuilder builder) {
    int o = builder.endObject();
    return o;
  }
}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy