home *** CD-ROM | disk | FTP | other *** search
- main(argc, argv) char **argv; {
- int ncv, nbyte, nindex, *indices;
- char *ifile, *ofile;
-
- if(argc != 4) {
- printf("Usage: %s ifile ofile ncv\n", argv[0]);
- exit(-1);
- }
-
- ifile = argv[1];
- ofile = argv[2];
- ncv = atoi(argv[3]);
-
- nbyte = cread2(ifile, &indices);
- nindex = nbyte / sizeof(float);
-
- rle_encode(&indices, &nindex, ncv);
-
- cwrite(ofile, indices, nindex*sizeof(int), 0);
- }
-