Skip to content
This repository has been archived by the owner on Feb 13, 2024. It is now read-only.

v2.1.0

Compare
Choose a tag to compare
@gaetandezeiraud gaetandezeiraud released this 27 Sep 08:47
· 36 commits to master since this release

Allow larger than 2GB files to be read.
By @jwkblades here mendsley/bsdiff#24

read and write return a signed int, meaning that they can only read
up to 2 billion bytes (2GB) at a time. bsdiff and bspatch were expecting
the entire file to be read (or written, respectively) in a single call
to read or write, which is only possible if they are less than 2GB
in size. There are also other times in which a single function call
would be inadequate for IO, for instance in the case where a device is
busy. The fix for this was to place the functions in a loop and continue
as long as at least 1 byte was transferred (in or out). If an error, or 0
return value, comes back from the transfer, break out of the loop and
return the total number of bytes that had been transferred up to that
point.