MCPcopy Create free account
hub / github.com/apache/arrow / garrow_codec_new

Function garrow_codec_new

c_glib/arrow-glib/codec.cpp:128–139  ·  view source on GitHub ↗

* garrow_codec_new: * @type: A #GArrowCompressionType. * @error: (nullable): Return location for a #GError or %NULL. * * Returns: A newly created #GArrowCodec on success, %NULL on error. * * Since: 0.12.0 */

Source from the content-addressed store, hash-verified

126 * Since: 0.12.0
127 */
128GArrowCodec *
129garrow_codec_new(GArrowCompressionType type, GError **error)
130{
131 auto arrow_type = garrow_compression_type_to_raw(type);
132 auto arrow_codec = arrow::util::Codec::Create(arrow_type);
133 if (garrow::check(error, arrow_codec, "[codec][new]")) {
134 std::shared_ptr<arrow::util::Codec> arrow_codec_shared = std::move(*arrow_codec);
135 return garrow_codec_new_raw(&arrow_codec_shared);
136 } else {
137 return NULL;
138 }
139}
140
141/**
142 * garrow_codec_get_name:

Callers

nothing calls this directly

Calls 3

garrow_codec_new_rawFunction · 0.85
checkFunction · 0.70

Tested by

no test coverage detected