1
0
Fork 0
mirror of https://github.com/pygos/pkg-utils.git synced 2024-11-16 18:37:12 +01:00
pkg-utils/include/pkg/pkgwriter.h
David Oberhollenzer 6cfd9a37bf Move all the package I/O code to libpkg library
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2019-04-05 12:33:50 +02:00

23 lines
541 B
C

/* SPDX-License-Identifier: ISC */
#ifndef PKGWRITER_H
#define PKGWRITER_H
#include <stdbool.h>
#include "comp/compressor.h"
#include "pkgformat.h"
typedef struct pkg_writer_t pkg_writer_t;
pkg_writer_t *pkg_writer_open(const char *path, bool force);
void pkg_writer_close(pkg_writer_t *writer);
int pkg_writer_start_record(pkg_writer_t *writer, uint32_t magic,
compressor_t *cmp);
int pkg_writer_write_payload(pkg_writer_t *wr, void *data, size_t size);
int pkg_writer_end_record(pkg_writer_t *wr);
#endif /* PKGWRITER_H */