Split up binary parsing to match text parsing

Parse the fragment header separately from the fragment chunk, which
makes each function a bit more understandable.
This commit is contained in:
Billy Keyes
2019-04-10 23:03:19 -07:00
parent 0cfd720d4f
commit ddafbc8ba3
2 changed files with 82 additions and 57 deletions
+1
View File
@@ -98,6 +98,7 @@ func (op LineOp) String() string {
// BinaryFragment describes changes to a binary file.
type BinaryFragment struct {
Method BinaryPatchMethod
Size int64
Data []byte
}