Class: ArrowFormat::Org::Apache::Arrow::Flatbuf::Buffer
- Inherits:
-
FlatBuffers::Struct
- Object
- FlatBuffers::Struct
- ArrowFormat::Org::Apache::Arrow::Flatbuf::Buffer
- Defined in:
- lib/arrow-format/org/apache/arrow/flatbuf/buffer.rb
Overview
A Buffer represents a single contiguous memory segment
Constant Summary collapse
- FIELDS =
{ offset: ::FlatBuffers::Field.new(:offset, 0, 0, :long, 0), length: ::FlatBuffers::Field.new(:length, 1, 8, :long, 0), }
- Data =
define_data_class
Instance Method Summary collapse
-
#length ⇒ Object
The absolute length (in bytes) of the memory buffer.
-
#offset ⇒ Object
The relative offset into the shared memory page where the bytes for this buffer starts.
Instance Method Details
#length ⇒ Object
The absolute length (in bytes) of the memory buffer. The memory is found from offset (inclusive) to offset + length (non-inclusive). When building messages using the encapsulated IPC message, padding bytes may be written after a buffer, but such padding bytes do not need to be accounted for in the size here.
29 30 31 32 |
# File 'lib/arrow-format/org/apache/arrow/flatbuf/buffer.rb', line 29 def length field_offset = 8 @view.unpack_long(field_offset) end |
#offset ⇒ Object
The relative offset into the shared memory page where the bytes for this buffer starts
36 37 38 39 |
# File 'lib/arrow-format/org/apache/arrow/flatbuf/buffer.rb', line 36 def offset field_offset = 0 @view.unpack_long(field_offset) end |