Lines Matching refs:sparse
30 * sparse_file_new - create a new sparse file cookie
33 * @len - size of the expanded sparse file.
40 * Returns the sparse file cookie, or NULL on error.
45 * sparse_file_destroy - destroy a sparse file cookie
47 * @s - sparse file cookie
49 * Destroys a sparse file cookie. After destroy, all memory passed in to
55 * sparse_file_add_data - associate a data chunk with a sparse file
57 * @s - sparse file cookie
60 * @block - offset in blocks into the sparse file to place the data chunk
62 * Associates a data chunk with a sparse file cookie. The region
64 * the sparse file. If len is not a multiple of the block size the data
67 * The data pointer must remain valid until the sparse file is closed or the
68 * data block is removed from the sparse file.
76 * sparse_file_add_fill - associate a fill chunk with a sparse file
78 * @s - sparse file cookie
81 * @block - offset in blocks into the sparse file to place the fill chunk
83 * Associates a chunk filled with fill_val with a sparse file cookie.
85 * be used in the sparse file. If len is not a multiple of the block size the
94 * sparse_file_add_file - associate a chunk of a file with a sparse file
96 * @s - sparse file cookie
100 * @block - offset in blocks into the sparse file to place the file chunk
102 * Associates a chunk of an existing file with a sparse file cookie.
104 * be used in the sparse file. If len is not a multiple of the block size the
107 * Allows adding large amounts of data to a sparse file without needing to keep
118 * sparse_file_add_file - associate a chunk of a file with a sparse file
120 * @s - sparse file cookie
124 * @block - offset in blocks into the sparse file to place the file chunk
126 * Associates a chunk of an existing fd with a sparse file cookie.
128 * be used in the sparse file. If len is not a multiple of the block size the
131 * Allows adding large amounts of data to a sparse file without needing to keep
135 * The fd must remain open until the sparse file is closed or the fd block is
136 * removed from the sparse file.
144 * sparse_file_write - write a sparse file to a file
146 * @s - sparse file cookie
149 * @sparse - write in the Android sparse file format
152 * Writes a sparse file to a file. If gz is true, the data will be passed
153 * through zlib. If sparse is true, the file will be written in the Android
154 * sparse file format. If sparse is false, the file will be written by seeking
156 * sparse files. If crc is true, the crc of the expanded data will be
161 int sparse_file_write(struct sparse_file *s, int fd, bool gz, bool sparse,
165 * sparse_file_len - return the length of a sparse file if written to disk
167 * @s - sparse file cookie
168 * @sparse - write in the Android sparse file format
171 * Returns the size a sparse file would be on disk if it were written in the
172 * specified format. If sparse is true, this is the size of the data in the
173 * sparse format. If sparse is false, this is the size of the normal
174 * non-sparse file.
176 int64_t sparse_file_len(struct sparse_file *s, bool sparse, bool crc);
179 * sparse_file_callback - call a callback for blocks in sparse file
181 * @s - sparse file cookie
182 * @sparse - write in the Android sparse file format
187 * Writes a sparse file by calling a callback function. If sparse is true, the
188 * file will be written in the Android sparse file format. If crc is true, the
191 * and with data==NULL to skip over a region (only used for non-sparse format).
196 int sparse_file_callback(struct sparse_file *s, bool sparse, bool crc,
200 * sparse_file_read - read a file into a sparse file cookie
202 * @s - sparse file cookie
204 * @sparse - read a file in the Android sparse file format
205 * @crc - verify the crc of a file in the Android sparse file format
207 * Reads a file into a sparse file cookie. If sparse is true, the file is
208 * assumed to be in the Android sparse file format. If sparse is false, the
210 * another 32 bit value. If crc is true, the crc of the sparse file will be
215 int sparse_file_read(struct sparse_file *s, int fd, bool sparse, bool crc);
218 * sparse_file_import - import an existing sparse file
220 * @s - sparse file cookie
221 * @verbose - print verbose errors while reading the sparse file
222 * @crc - verify the crc of a file in the Android sparse file format
224 * Reads an existing sparse file into a sparse file cookie, recreating the same
225 * sparse cookie that was used to write it. If verbose is true, prints verbose
226 * errors when the sparse file is formatted incorrectly.
228 * Returns a new sparse file cookie on success, NULL on error.
233 * sparse_file_import_auto - import an existing sparse or normal file
236 * @crc - verify the crc of a file in the Android sparse file format
239 * Reads an existing sparse or normal file into a sparse file cookie.
240 * Attempts to determine if the file is sparse or not by looking for the sparse
241 * file magic number in the first 4 bytes. If the file is not sparse, the file
243 * 32 bit value. If crc is true, the crc of the sparse file will be verified.
245 * Returns a new sparse file cookie on success, NULL on error.
249 /** sparse_file_resparse - rechunk an existing sparse file into smaller files
251 * @in_s - sparse file cookie of the existing sparse file
253 * @out_s - array of sparse file cookies
256 * Splits chunks of an existing sparse file into smaller sparse files such that
257 * each sparse file is less than max_len. Returns the number of sparse_files
264 * sparse_file_verbose - set a sparse file cookie to print verbose errors
266 * @s - sparse file cookie
268 * Print verbose sparse file errors whenever using the sparse file cookie.