Top | ![]() |
![]() |
![]() |
![]() |
Modulemd Compression Helpers (Private)Modulemd Compression Helpers (Private) — Internal utility functions for working with compressed files. |
void
mmd_Fclose (FD_t fd
);
Wrapper for rpmio's Fclose()
function to use with
G_DEFINE_AUTO_CLEANUP_FREE_FUNC()
Since: 2.8
ModulemdCompressionTypeEnum modulemd_detect_compression (const gchar *filename
,int fd
,GError **error
);
filename |
The original filename that matches |
[in] |
fd |
An open file descriptor pointing at a real file. |
[in] |
error |
A GError containing the reason this function failed. |
[out] |
The ModulemdCompressionTypeEnum detected from this file
descriptor. In the event of an error, returns
MODULEMD_COMPRESSION_TYPE_DETECTION_FAILED and sets error
appropriately. Returns MODULEMD_COMPRESSION_TYPE_UNKNOWN_COMPRESSION if
all detection methods complete but the type is still indeterminate.
Since: 2.8
const gchar *
modulemd_compression_suffix (ModulemdCompressionTypeEnum comtype
);
A static string representing the filename suffix that a file of this compression type should have.
[transfer none]
Since: 2.8
gchar * modulemd_get_rpmio_fmode (const gchar *mode
,ModulemdCompressionTypeEnum comtype
);
A string suitable for passing to rpmio's
function. NULL if Fopen()
mode
is NULL or the comtype
is invalid.
[transfer full]
Since: 2.8
gint compressed_stream_read_fn (void *data
,unsigned char *buffer
,size_t size
,size_t *size_read
);
A ModulemdReadHandler that uses rpmio's
function to handle
compressed files.Fread()
data |
A private pointer to the data being read. |
[inout] |
buffer |
The buffer to write the data from the source. |
[out] |
size |
The size of the buffer. |
[in] |
size_read |
The actual number of bytes read from the source. |
[out] |
Since: 2.8