View | Details | Raw Unified
Collapse All | Expand All

(-) rzip-2.1/main.c (-1 / +15 lines)
 Lines 35-40    Link Here 
	printf("     -k            keep existing files\n");
	printf("     -k            keep existing files\n");
	printf("     -P            show compression progress\n");
	printf("     -P            show compression progress\n");
	printf("     -L level      set compression level\n");
	printf("     -L level      set compression level\n");
	printf("     -l nr         set higher bits of the expected file length to nr\n");
	printf("     -V            show version\n");
	printf("     -V            show version\n");
#if 0
#if 0
	/* damn, this will be quite hard to do */
	/* damn, this will be quite hard to do */
 Lines 172-177    Link Here 
	
	
	read_magic(fd_in, fd_out, &expected_size);
	read_magic(fd_in, fd_out, &expected_size);
#ifdef HAVE_LARGE_FILES
	if (control->nr) {
		expected_size = ( ((off_t)(control->nr))<<32) | (expected_size & 0xFFFFFFFF);
	}
#endif
	runzip_fd(fd_in, fd_out, fd_hist, expected_size);	
	runzip_fd(fd_in, fd_out, fd_hist, expected_size);	
	
	
	if ((control->flags & FLAG_TEST_ONLY) == 0) {
	if ((control->flags & FLAG_TEST_ONLY) == 0) {
 Lines 267-273    Link Here 
		control.flags |= FLAG_DECOMPRESS;
		control.flags |= FLAG_DECOMPRESS;
	}
	}
	while ((c = getopt(argc, argv, "h0123456789dS:tVvkfPo:L:")) != -1) {
	while ((c = getopt(argc, argv, "h0123456789dS:tVvkl:fPo:L:")) != -1) {
		if (isdigit(c)) {
		if (isdigit(c)) {
			control.compression_level = c - '0';
			control.compression_level = c - '0';
			continue;
			continue;
 Lines 295-300    Link Here 
		case 'k':
		case 'k':
			control.flags |= FLAG_KEEP_FILES;
			control.flags |= FLAG_KEEP_FILES;
			break;
			break;
		case 'l':
#ifndef HAVE_LARGE_FILES
			fatal("You used the -l option, but this rzip doesn't support large files.");
#endif
			control.nr = atoi(optarg);
			break;
		case 'v':
		case 'v':
			control.verbosity++;
			control.verbosity++;
			break;
			break;
(-) rzip-2.1/runzip.c (-3 / +9 lines)
 Lines 179-188    Link Here 
 */
 */
off_t runzip_fd(int fd_in, int fd_out, int fd_hist, off_t expected_size)
off_t runzip_fd(int fd_in, int fd_out, int fd_hist, off_t expected_size)
{
{
	off_t total = 0;
	off_t total = 0, fin=1;
	while (total < expected_size) {
	while (fin && total < expected_size) {
		total += runzip_chunk(fd_in, fd_out, fd_hist);
		fin = runzip_chunk(fd_in, fd_out, fd_hist);
		total += fin;
	}
	}
	if (total < expected_size) {
		fprintf(stderr, "Warning: The uncompressed size does not equal the expected file size.\nHowever if you used the -l option, this may be okay.\n");
	}
	return total;
	return total;
}
}
(-) rzip-2.1/rzip.h (+1 lines)
 Lines 113-118    Link Here 
	unsigned compression_level;
	unsigned compression_level;
	unsigned flags;
	unsigned flags;
	unsigned verbosity;
	unsigned verbosity;
	unsigned nr;
};
};
void fatal(const char *format, ...);
void fatal(const char *format, ...);