I am doing a backup ans restore project on C++ .
I need to back one million small files ranging from 5kb . I follow the steps below,
1. Read files upto 1 GB and save in a buffer and read 7200 bytes from buffer.
2. Compress it.
3. And send to server.
I m trying Snappy algorithm for compression. Can i get fixed length of bytes(say 1.5MB) as a compressed output each time . Using Zlib's dictionary i was able to attain that. So that while restoring the backed up files , i will be able to give 1.5 MB and decompress it. But Zlib seems to be slower , so i opted for snappy algorithm. How can i implement the dictionary concept in snappy algorithm effectively. ??