2 #include "statichuff.h"
5 int main(int argc, char* argv[])
10 long int volumesize = 0;
14 while ((ch = getopt(argc, argv, "cdt:")) != -1) {
24 volumesize = atoi(optarg);
27 default: fprintf(stderr, "Usage: %s [-cdt] sourcefile targetfile\n", argv[0]);
32 if ( (argc == 1) || (cflag & dflag) || !(cflag | dflag) || ((argc - optind) < 2) ) {
33 fprintf(stderr, "Usage: %s [-cdt] sourcefile targetfile\n", argv[0]);
34 if ((tflag == 1) && (volumesize < 0)) fprintf(stderr,"Error: The volume size must be a non-zero value\n");
40 shuff = shuff_init_static_byfile(argv[optind],argv[optind+1],volumesize*1024);
41 shuff_encode_file(shuff);
42 shuff_deinit_static_byfile(shuff);
48 shuff = shuff_init_static_byfile(argv[optind],argv[optind+1],0);
49 shuff_decode_file(shuff);
50 shuff_deinit_static_byfile(shuff);