Leanify the file and move the file ahead size_leanified bytes the new location of the file will be file_pointer - size_leanified it's designed this way to avoid extra memmove or memcpy return new size
| 196 | // it's designed this way to avoid extra memmove or memcpy |
| 197 | // return new size |
| 198 | size_t LeanifyFile(void *file_pointer, size_t file_size, size_t size_leanified /*= 0*/, const string& filename /*= ""*/) |
| 199 | { |
| 200 | Format *f = GetType(file_pointer, file_size, filename); |
| 201 | size_t r = f->Leanify(size_leanified); |
| 202 | delete f; |
| 203 | return r; |
| 204 | } |
| 205 | |
| 206 | |
| 207 | size_t ZlibRecompress(void *src, size_t src_len, size_t size_leanified /*= 0*/) |