bdiff

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2023 License: BSD-3-Clause, MIT Imports: 6 Imported by: 0

README

bdiff

Documentation

Overview

Copyright (c) 2023 Lukas Rist

Copyright 2015 Monmohan Singh. All rights reserved.

Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.

Copyright 2015 Monmohan Singh. All rights reserved.

Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.

Copyright 2015 Monmohan Singh. All rights reserved.

Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Patch

func Patch(delta Delta, src io.ReadSeeker, dst io.Writer) error

Patch the delta from the source to the destination

Types

type Block

type Block struct {
	Start, End uint32
	Checksum32 uint32
	Sha256hash [sha256.Size]byte
	HasData    bool
	RawBytes   []byte
	String     string
}

func (*Block) Print

func (b *Block) Print()

type Delta

type Delta []Block

func Diff

func Diff(src io.Reader, fileSize int, f Fingerprint) (Delta, error)

func (Delta) Print

func (d Delta) Print()

type Fingerprint

type Fingerprint struct {
	BlockSize uint32
	Blocks    map[uint32]map[[sha256.Size]byte]Block
}

func NewFingerprint

func NewFingerprint(src io.Reader, blockSize uint32) (Fingerprint, error)

func (*Fingerprint) Print

func (fp *Fingerprint) Print()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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