summaryrefslogtreecommitdiffstats
path: root/libsparse/backed_block.h
Commit message (Collapse)AuthorAgeFilesLines
* libsparse: add function to resparse a file and a utility to use itColin Cross2012-07-091-0/+6
| | | | | | | | | Add sparse_file_repsarse, which splits chunks in an existing sparse file such that the maximum size of a chunk, plus a header and footer, is smaller than the given size. This will allow multiple smaller sparse files to result in the same data as a large sparse file. Change-Id: I177abdb958a23d5afd394ff265c5b0c6a3ff22fa
* libsparse: merge adjacent blocks of the same typeColin Cross2012-07-091-1/+1
| | | | | | | | | | | | When a block is added that is adjacent to another block and of the same type, merge it. This will be useful for converting regular images to sparse images, allowing the reader to add a single block at a time and letting libsparse optimize into larger blocks as it goes. Does not support merge two blocks that are backed by a data pointer, only blocks that are backed by a file for now. Change-Id: I95aa231714cbe01ac194e868c21385806c0bdb97
* libsparse: add support for including fdsColin Cross2012-07-091-0/+4
| | | | | | | | Add sparse_file_add_fd to include all or part of the contents of an fd in the output file. Will be useful for re-sparsing files where fd will point to the input sparse file. Change-Id: I5d4ab07fb37231e8e9c1912f62a2968c8b0a00ef
* libsparse: cleanupsColin Cross2012-07-091-18/+27
| | | | | | | | | | Move block loops into sparse.c with iterator helpers in backed_block.c. Simplify chunk writing by moving skip chunk calls from output_file.c to sparse.c. Rename variables to be consistent with new naming. Remove use of u8, u32, u64. Change-Id: Ic138ad58bef9f96239266ccee12ee83ea285e7eb
* libsparse: remove static variablesColin Cross2012-07-091-11/+17
| | | | | | | Removes static variables in backed_block.c to allow multiple sparse files to be open at the same time. Change-Id: I012d8a424c6e21a7352408416adb7c72ee8add21
* system/core: move libsparse into system/coreColin Cross2012-07-091-0/+39
This moves an exact copy of libsparse from system/extras/ext4_utils/libsparse to system/core/libsparse in preparation for linking tools in system/core against it. Change-Id: If664e4fcfd6612844ac745589beb1517e7f9fe58