VPrintf1( "codes %d\n", s->numZ-nBytes );
}
+extern int quirk_suse;
/*---------------------------------------------------*/
void compressBlock ( EState* s, Bool is_last_block )
"combined CRC = 0x%8x, size = %d\n",
s->blockNo, s->blockCRC, s->combinedCRC, s->nblock );
- blockSort ( s );
+ if (quirk_suse)
+ blockSort_10 ( s );
+ else
+ blockSort ( s );
}
s->zbits = (UChar*) (&((UInt16*)s->arr2)[s->nblock]);
#include <time.h>
extern void gnuzip(int in, int out, char *origname, unsigned long timestamp, int level, int osflag, int rsync, int newrsync);
-extern void old_bzip2(int level);
+extern void old_bzip2(int level, int suse_quirk);
#define BUFLEN (64 * 1024)
int mflag = 0;
int fflag = 0;
int xflag = -1;
+ int suse_quirk = 0;
int ntfs_quirk = 0;
int level = 6;
int osflag = GZIP_OS_UNIX;
/* maximum compression but without indicating so */
level = 9;
xflag = 0;
+ } else if (strcmp(optarg, "suse") == 0) {
+ /* SuSe's patched bzip2. (Inexact emulation.) */
+ suse_quirk = 1;
} else {
fprintf(stderr, "%s: unknown quirk!\n", progname);
usage();
}
gnuzip(STDIN_FILENO, STDOUT_FILENO, origname, timestamp, level, osflag, rsync, new_rsync);
} else if (bzold) {
- if (quirks) {
- fprintf(stderr, "%s: quirks not supported with --old-bzip\n", progname);
- return 1;
- }
- old_bzip2(level);
+ old_bzip2(level, suse_quirk);
} else {
if (rsync || new_rsync) {
fprintf(stderr, "%s: --rsyncable not supported with --zlib\n", progname);
" -R --rsyncable make rsync-friendly archive\n"
" -r --new-rsyncable make rsync-friendly archive (new version)\n"
" \nzlib-specific options:\n"
- " -k --quirk QUIRK enable a format quirk (buggy-bsd, ntfs, perl)\n");
+ " -k --quirk QUIRK enable a format quirk (buggy-bsd, ntfs, perl, suse)\n");
exit(0);
}