libsquashfs
1.3.2
A new set of tools and libraries for working with SquashFS images
Toggle main menu visibility
Loading...
Searching...
No Matches
frag_table.h
Go to the documentation of this file.
1
/* SPDX-License-Identifier: LGPL-3.0-or-later */
2
/*
3
* frag_table.h - This file is part of libsquashfs
4
*
5
* Copyright (C) 2019 David Oberhollenzer <goliath@infraroot.at>
6
*
7
* This program is free software: you can redistribute it and/or modify
8
* it under the terms of the GNU Lesser General Public License as published
9
* by the Free Software Foundation, either version 3 of the License, or
10
* (at your option) any later version.
11
*
12
* This program is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
* GNU General Public License for more details.
16
*
17
* You should have received a copy of the GNU Lesser General Public License
18
* along with this program. If not, see <https://www.gnu.org/licenses/>.
19
*/
20
#ifndef SQFS_FRAG_TABLE_H
21
#define SQFS_FRAG_TABLE_H
22
23
#include "
sqfs/predef.h
"
24
30
38
39
#ifdef __cplusplus
40
extern
"C"
{
41
#endif
42
52
SQFS_API
sqfs_frag_table_t
*
sqfs_frag_table_create
(sqfs_u32 flags);
53
67
SQFS_API
int
sqfs_frag_table_read
(
sqfs_frag_table_t
*tbl,
sqfs_file_t
*file,
68
const
sqfs_super_t
*super,
69
sqfs_compressor_t
*cmp);
70
88
SQFS_API
int
sqfs_frag_table_write
(
sqfs_frag_table_t
*tbl,
sqfs_file_t
*file,
89
sqfs_super_t
*super,
sqfs_compressor_t
*cmp);
90
103
SQFS_API
int
sqfs_frag_table_lookup
(
sqfs_frag_table_t
*tbl, sqfs_u32 index,
104
sqfs_fragment_t
*out);
105
119
SQFS_API
int
sqfs_frag_table_append
(
sqfs_frag_table_t
*tbl, sqfs_u64 location,
120
sqfs_u32 size, sqfs_u32 *index);
121
135
SQFS_API
int
sqfs_frag_table_set
(
sqfs_frag_table_t
*tbl, sqfs_u32 index,
136
sqfs_u64 location, sqfs_u32 size);
137
147
SQFS_API
size_t
sqfs_frag_table_get_size
(
sqfs_frag_table_t
*tbl);
148
149
#ifdef __cplusplus
150
}
151
#endif
152
153
#endif
/* SQFS_FRAG_TABLE_H */
predef.h
Includes forward declarations of data structures, macros and integer types.
sqfs_compressor_t
Encapsultes a compressor with a simple interface to compress or extract chunks of data.
Definition
compressor.h:40
sqfs_file_t
Abstracts file I/O to make it easy to embedd SquashFS.
Definition
io.h:94
sqfs_frag_table_t
Abstracts reading, writing and management of the fragment table.
sqfs_frag_table_t::sqfs_frag_table_lookup
SQFS_API int sqfs_frag_table_lookup(sqfs_frag_table_t *tbl, sqfs_u32 index, sqfs_fragment_t *out)
Resolve a fragment block index to its description.
sqfs_frag_table_t::sqfs_frag_table_read
SQFS_API int sqfs_frag_table_read(sqfs_frag_table_t *tbl, sqfs_file_t *file, const sqfs_super_t *super, sqfs_compressor_t *cmp)
Load a fragment table from a SquashFS image.
sqfs_frag_table_t::sqfs_frag_table_write
SQFS_API int sqfs_frag_table_write(sqfs_frag_table_t *tbl, sqfs_file_t *file, sqfs_super_t *super, sqfs_compressor_t *cmp)
Write a fragment table to a SquashFS image.
sqfs_frag_table_t::sqfs_frag_table_set
SQFS_API int sqfs_frag_table_set(sqfs_frag_table_t *tbl, sqfs_u32 index, sqfs_u64 location, sqfs_u32 size)
Modify an existing entry in a fragment table.
sqfs_frag_table_t::sqfs_frag_table_get_size
SQFS_API size_t sqfs_frag_table_get_size(sqfs_frag_table_t *tbl)
Get the number of entries stored in a fragment table.
sqfs_frag_table_t::sqfs_frag_table_create
SQFS_API sqfs_frag_table_t * sqfs_frag_table_create(sqfs_u32 flags)
Create a fragment table.
sqfs_frag_table_t::sqfs_frag_table_append
SQFS_API int sqfs_frag_table_append(sqfs_frag_table_t *tbl, sqfs_u64 location, sqfs_u32 size, sqfs_u32 *index)
Append a table entry to a fragment table.
sqfs_fragment_t
Data structure that makes up the fragment table entries.
Definition
block.h:42
sqfs_super_t
The SquashFS super block, located at the beginning of the file system to describe the layout of the f...
Definition
super.h:47
include
sqfs
frag_table.h
Generated by
1.17.0