Class: ArrowFormat::Org::Apache::Arrow::Flatbuf::BodyCompression
- Inherits:
-
FlatBuffers::Table
- Object
- FlatBuffers::Table
- ArrowFormat::Org::Apache::Arrow::Flatbuf::BodyCompression
- Defined in:
- lib/arrow-format/org/apache/arrow/flatbuf/body_compression.rb
Overview
Optional compression for the memory buffers constituting IPC message bodies. Intended for use with RecordBatch but could be used for other message types
Constant Summary collapse
- FIELDS =
{ codec: ::FlatBuffers::Field.new(:codec, 0, 4, :byte, 0), method: ::FlatBuffers::Field.new(:method, 1, 6, :byte, 0), }
- Data =
define_data_class
Instance Method Summary collapse
-
#codec ⇒ Object
Compressor library.
-
#method ⇒ Object
Indicates the way the record batch body was compressed.
Instance Method Details
#codec ⇒ Object
Compressor library. For LZ4_FRAME, each compressed buffer must consist of a single frame.
29 30 31 32 33 34 35 36 37 |
# File 'lib/arrow-format/org/apache/arrow/flatbuf/body_compression.rb', line 29 def codec field_offset = @view.unpack_virtual_offset(4) if field_offset.zero? enum_value = 0 else enum_value = @view.unpack_byte(field_offset) end ::ArrowFormat::Org::Apache::Arrow::Flatbuf::CompressionType.try_convert(enum_value) || enum_value end |
#method ⇒ Object
Indicates the way the record batch body was compressed
40 41 42 43 44 45 46 47 48 |
# File 'lib/arrow-format/org/apache/arrow/flatbuf/body_compression.rb', line 40 def method field_offset = @view.unpack_virtual_offset(6) if field_offset.zero? enum_value = 0 else enum_value = @view.unpack_byte(field_offset) end ::ArrowFormat::Org::Apache::Arrow::Flatbuf::BodyCompressionMethod.try_convert(enum_value) || enum_value end |