Output stream classes

Output stream classes

Functions

Properties

GOutputStream * raw Read / Write / Construct Only
GArrowCodec * codec Read / Write / Construct Only
GArrowOutputStream * raw Read / Write / Construct Only
gpointer output-stream Write / Construct Only

Types and Values

Object Hierarchy

    GObject
    ╰── GArrowOutputStream
        ├── GArrowBufferOutputStream
        ├── GArrowCompressedOutputStream
        ├── GArrowCUDABufferOutputStream
        ├── GArrowFileOutputStream
        ├── GArrowGIOOutputStream
        ├── GArrowBufferOutputStream
        ├── GArrowCompressedOutputStream
        ├── GArrowFileOutputStream
        ╰── GArrowGIOOutputStream

Implemented Interfaces

GArrowFileOutputStream implements GArrowFile and GArrowWritable.

GArrowBufferOutputStream implements GArrowFile and GArrowWritable.

GArrowGIOOutputStream implements GArrowFile and GArrowWritable.

GArrowCompressedOutputStream implements GArrowFile and GArrowWritable.

GArrowOutputStream implements GArrowFile and GArrowWritable.

Includes

#include <arrow-glib/arrow-glib.h>

Description

GArrowOutputStream is an interface for stream output. Stream output is file based and writable

GArrowFileOutputStream is a class for file output stream.

GArrowBufferOutputStream is a class for buffer output stream.

GArrowGIOOutputStream is a class for GOutputStream based output stream.

GArrowCompressedOutputStream is a class to write compressed data to output stream.

Functions

garrow_output_stream_align ()

gboolean
garrow_output_stream_align (GArrowOutputStream *stream,
                            gint32 alignment,
                            GError **error);

Parameters

stream

A GArrowOutputStream.

 

alignment

The byte multiple for the metadata prefix, usually 8 or 64, to ensure the body starts on a multiple of that alignment.

 

error

Return location for a GError or NULL.

[nullable]

Returns

TRUE on success, FALSE on error.

Since: 0.11.0


garrow_output_stream_write_tensor ()

gint64
garrow_output_stream_write_tensor (GArrowOutputStream *stream,
                                   GArrowTensor *tensor,
                                   GError **error);

Parameters

stream

A GArrowOutputStream.

 

tensor

A GArrowTensor to be written.

 

error

Return location for a GError or NULL.

[nullable]

Returns

The number of written bytes on success, -1 on error.

Since: 0.4.0


garrow_output_stream_write_record_batch ()

gint64
garrow_output_stream_write_record_batch
                               (GArrowOutputStream *stream,
                                GArrowRecordBatch *record_batch,
                                GArrowWriteOptions *options,
                                GError **error);

Parameters

stream

A GArrowOutputStream.

 

record_batch

A GArrowRecordBatch to be written.

 

options

A GArrowWriteOptions.

[nullable]

error

Return location for a GError or NULL.

[nullable]

Returns

The number of written bytes on success, -1 on error.

Since: 1.0.0


garrow_file_output_stream_new ()

GArrowFileOutputStream *
garrow_file_output_stream_new (const gchar *path,
                               gboolean append,
                               GError **error);

Parameters

path

The path of the file output stream.

 

append

Whether the path is opened as append mode or recreate mode.

 

error

Return location for a GError or NULL.

[nullable]

Returns

A newly opened GArrowFileOutputStream or NULL on error.

[nullable]


garrow_buffer_output_stream_new ()

GArrowBufferOutputStream *
garrow_buffer_output_stream_new (GArrowResizableBuffer *buffer);

Parameters

buffer

The resizable buffer to be output.

 

Returns

A newly created GArrowBufferOutputStream.

[transfer full]


garrow_gio_output_stream_new ()

GArrowGIOOutputStream *
garrow_gio_output_stream_new (GOutputStream *gio_output_stream);

Parameters

gio_output_stream

The stream to be output.

 

Returns

A newly created GArrowGIOOutputStream.

[transfer full]


garrow_gio_output_stream_get_raw ()

GOutputStream *
garrow_gio_output_stream_get_raw (GArrowGIOOutputStream *output_stream);

garrow_gio_output_stream_get_raw has been deprecated since version 0.12.0 and should not be used in newly-written code.

Use GArrowGIOOutputStream::raw property instead.

Parameters

output_stream

A GArrowGIOOutputStream.

 

Returns

The wrapped GOutputStream.

[transfer none]

Since: 0.5.0


garrow_compressed_output_stream_new ()

GArrowCompressedOutputStream *
garrow_compressed_output_stream_new (GArrowCodec *codec,
                                     GArrowOutputStream *raw,
                                     GError **error);

Parameters

codec

A GArrowCodec for compressed data in the raw .

 

raw

A GArrowOutputStream that is a sink for compressed data.

 

error

Return location for a GError or NULL.

[nullable]

Returns

A newly created GArrowCompressedOutputStream.

Since: 0.12.0

Types and Values

GARROW_TYPE_OUTPUT_STREAM

#define GARROW_TYPE_OUTPUT_STREAM (garrow_output_stream_get_type())

struct GArrowOutputStreamClass

struct GArrowOutputStreamClass {
  GObjectClass parent_class;
};

struct GArrowFileOutputStream

struct GArrowFileOutputStream;

It wraps arrow::io::FileOutputStream.


struct GArrowBufferOutputStream

struct GArrowBufferOutputStream;

It wraps arrow::io::BufferOutputStream.


struct GArrowGIOOutputStream

struct GArrowGIOOutputStream;

It's an output stream for GOutputStream.


GARROW_TYPE_COMPRESSED_OUTPUT_STREAM

#define             GARROW_TYPE_COMPRESSED_OUTPUT_STREAM

struct GArrowCompressedOutputStreamClass

struct GArrowCompressedOutputStreamClass {
  GArrowOutputStreamClass parent_class;
};

GArrowCompressedOutputStream

typedef struct _GArrowCompressedOutputStream GArrowCompressedOutputStream;

GArrowOutputStream

typedef struct _GArrowOutputStream GArrowOutputStream;

Property Details

The “raw” property

  “raw”                      GOutputStream *

The raw GOutputStream *.

Owner: GArrowGIOOutputStream

Flags: Read / Write / Construct Only


The “codec” property

  “codec”                    GArrowCodec *

The codec for the stream.

Owner: GArrowCompressedOutputStream

Flags: Read / Write / Construct Only


The “raw” property

  “raw”                      GArrowOutputStream *

The underlying raw output stream.

Owner: GArrowCompressedOutputStream

Flags: Read / Write / Construct Only


The “output-stream” property

  “output-stream”            gpointer

The raw std::shared<arrow::io::OutputStream> *.

Owner: GArrowOutputStream

Flags: Write / Construct Only