Bindings to the seekable variant of the ZSTD compression format

#9 Copying similar to C version

Opened by darleybarreto on October 9, 2021
darleybarreto on October 9, 2021

I’ll add a patch for this.

Original C

memcpy((BYTE*)output->dst + output->pos,
               tmp + (fl->seekTablePos - offset), lenWrite);

Current Rust

output[*pos..*pos + len_write].copy_from_slice(&bytes[..len_write]);

Possibly right version

let start_write = (self.seek_table_pos - offset) as usize;
output[*pos..*pos + len_write].copy_from_slice(&bytes[start_write .. start_write + len_write]);
darleybarreto added a change on October 9, 2021
WCOOB6VVCGVVS6UPWYBS36ALHRJ77D5CWPBMK2XC2NM4SOMQW7SQC