2 #include "statichuff.h"
5 int main(int argc, char* argv[])
12 long int volumesize = 0;
15 char *staticmodel = NULL;
17 while ((ch = getopt(argc, argv, "scdm:t:")) != -1) {
27 volumesize = atoi(optarg);
37 default: fprintf(stderr, "Usage: %s [-cds] [-t volsizekb] sourcefile targetfile [-m modeldumpfile]\n", argv[0]);
42 if ( (argc == 1) || (cflag & dflag) || !(cflag | dflag) || ((argc - optind) < 2) ) {
43 fprintf(stderr, "Usage: %s [-cds] [-t volsizekb] sourcefile targetfile [-m modeldumpfile]\n", argv[0]);
44 if ((tflag == 1) && (volumesize < 0)) fprintf(stderr,"Error: The volume size must be a non-zero value\n");
50 shuff = shuff_init_encoder_byfile(argv[optind],argv[optind+1],volumesize*1024);
51 if (mflag == 1) shuff_loadmodel(shuff,staticmodel);
52 shuff_encode_file(shuff);
53 if (sflag == 1) shuff_savemodel(shuff);
54 shuff_deinit_encoder(shuff);
60 shuff = shuff_init_decoder(argv[optind],argv[optind+1]);
61 shuff_decode_file(shuff);
62 shuff_deinit_decoder(shuff);