This will use a little bit more memory per opened archive, but will make
extraction somewhat faster. Extracting the snapshot shrinks from about
25 to 23 seconds on my system.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
// The maximum number of symlinks to follow when reading a file from an archive
#define MAX_FOLLOW_SYMLINKS 10
+#define ARCHIVE_READ_BLOCK_SIZE 512 * 1024
+
struct pakfire_archive {
struct pakfire_ctx* ctx;
struct pakfire* pakfire;
FILE* f;
// Buffer to store a block of data
- char buffer[128 * 1024];
+ char buffer[ARCHIVE_READ_BLOCK_SIZE];
enum {
PAKFIRE_ARCHIVE_FILE_CANT_SEEK = (1 << 0),