diff options
author | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2019-09-20 22:50:10 +0200 |
---|---|---|
committer | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2019-09-20 22:50:10 +0200 |
commit | 79498fa15227d4659489763ed2a9a1e806c11428 (patch) | |
tree | caf6fcb8132b30afa260b4be1b853cca67cbd381 /include/data_reader.h | |
parent | 012a83c9466e8668fc08acb6a80fa4dd5c82997c (diff) |
Integrate the data reader into libsquashfs
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'include/data_reader.h')
-rw-r--r-- | include/data_reader.h | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/include/data_reader.h b/include/data_reader.h deleted file mode 100644 index 2ad3749..0000000 --- a/include/data_reader.h +++ /dev/null @@ -1,51 +0,0 @@ -/* SPDX-License-Identifier: GPL-3.0-or-later */ -/* - * data_reader.h - * - * Copyright (C) 2019 David Oberhollenzer <goliath@infraroot.at> - */ -#ifndef DATA_READER_H -#define DATA_READER_H - -#include "config.h" - -#include "sqfs/compress.h" -#include "sqfs/data.h" -#include "fstree.h" - -typedef struct sqfs_data_reader_t sqfs_data_reader_t; - - -sqfs_data_reader_t *sqfs_data_reader_create(sqfs_file_t *file, - size_t block_size, - sqfs_compressor_t *cmp); - -int sqfs_data_reader_load_fragment_table(sqfs_data_reader_t *data, - const sqfs_super_t *super); - -void sqfs_data_reader_destroy(sqfs_data_reader_t *data); - -int sqfs_data_reader_get_fragment(sqfs_data_reader_t *data, - const sqfs_inode_generic_t *inode, - sqfs_block_t **out); - -int sqfs_data_reader_get_block(sqfs_data_reader_t *data, - const sqfs_inode_generic_t *inode, - size_t index, sqfs_block_t **out); - -int sqfs_data_reader_dump(sqfs_data_reader_t *data, - const sqfs_inode_generic_t *inode, - int outfd, size_t block_size, bool allow_sparse); - -/* - Read a chunk of data from a file. Starting from 'offset' into the - uncompressed file, read 'size' bytes into 'buffer'. - - Returns the number of bytes read, 0 if EOF, -1 on failure. Prints an - error message to stderr on failure. - */ -ssize_t sqfs_data_reader_read(sqfs_data_reader_t *data, - const sqfs_inode_generic_t *inode, - uint64_t offset, void *buffer, size_t size); - -#endif /* DATA_READER_H */ |