Issue #1859 - Part 3: Replace bzip2 handling in MAR files with xz.

Since there really is no need to add file detection logic to the updater
if updating through AUS is old->new only anyway, replacing bzip2
handling with xz handling is fine, instead of adding it.
Considering the far superior compression of LZMA and MAR not being
a common archive format anyway, let's just K.I.S.S. it :)
This commit is contained in:
Moonchild 2022-01-20 18:10:55 +00:00 • committed by roytam1
commit a195efca40
6 changed files with 64 additions and 37 deletions

View file

@ -109,7 +109,7 @@ int mar_enum_items(MarFile *mar, MarItemCallback callback, void *data);
* @return The number of bytes written or a negative value if an
* error occurs.
*/
int mar_read(MarFile *mar, const MarItem *item, int offset, char *buf,
int mar_read(MarFile *mar, const MarItem *item, int offset, uint8_t *buf,
int bufsize);
/**

View file

@ -37,7 +37,7 @@ static int mar_ensure_parent_dir(const char *path)
static int mar_test_callback(MarFile *mar, const MarItem *item, void *unused) {
FILE *fp;
char buf[BLOCKSIZE];
uint8_t buf[BLOCKSIZE];
int fd, len, offset = 0;
if (mar_ensure_parent_dir(item->name))

View file

@ -530,7 +530,7 @@ int mar_enum_items(MarFile *mar, MarItemCallback callback, void *closure) {
return 0;
}
int mar_read(MarFile *mar, const MarItem *item, int offset, char *buf,
int mar_read(MarFile *mar, const MarItem *item, int offset, uint8_t *buf,
int bufsize) {
int nr;