Buckets:
| // libzpaq stream compress: zc in out [method] | |
| void libzpaq::error(const char* msg){fprintf(stderr,"zpaq: %s\n",msg);exit(1);} | |
| class In:public libzpaq::Reader{FILE*f;public:In(FILE*x):f(x){} | |
| int get(){return getc(f);} int read(char*b,int n){return fread(b,1,n,f);}}; | |
| class Out:public libzpaq::Writer{FILE*f;public:Out(FILE*x):f(x){} | |
| void put(int c){putc(c,f);} void write(char*b,int n){fwrite(b,1,n,f);}}; | |
| int main(int argc,char**argv){ | |
| if(argc<3){fprintf(stderr,"usage: zc in out [method]\n");return 2;} | |
| const char* m=argc>3?argv[3]:"5"; | |
| FILE*fi=fopen(argv[1],"rb"); if(!fi){perror(argv[1]);return 1;} | |
| FILE*fo=fopen(argv[2],"wb"); if(!fo){perror(argv[2]);return 1;} | |
| In in(fi); Out out(fo); | |
| libzpaq::compress(&in,&out,m); | |
| fclose(fi); fclose(fo); | |
| return 0; | |
| } | |
Xet Storage Details
- Size:
- 838 Bytes
- Xet hash:
- fb862c1a1ec8d6eac15b3e3663bdf45f83dc04f465d6e5fcc5a7066889380541
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.