delta

package
v0.0.0-...-f39f0c1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 18, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Delta provides functions for reading and calculating git styles deltas.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Calculate

func Calculate(w io.Writer, src, dst []byte, maxsz int) error

Calculate how to generate dst using src as the base of the deltas and write the result to w.

func CalculateWithIndex

func CalculateWithIndex(index *suffixarray.Index, w io.Writer, src, dst []byte, maxsz int) error

Types

type Reader

type Reader struct {
	// contains filtered or unexported fields
}

Reader reads a Delta from Src and computes the delta using Base to resolve inserts.

func NewReader

func NewReader(src flate.Reader, base io.ReadSeeker) Reader

Creates a new Delta using src and base as the source and

func (Reader) Len

func (d Reader) Len() int

func (*Reader) Read

func (d *Reader) Read(buf []byte) (int, error)

Reads the resolved delta from the underlying delta stream into buf

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL