rsync

package module
v0.0.0-...-a9aacaf Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2019 License: BSD-2-Clause Imports: 7 Imported by: 0

Documentation

Overview

Copyright 2018 Daniel Reiter Horn

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  1. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  1. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Index

Constants

View Source
const CRC_MAGIC uint32 = uint32(CRC_MAGIC_16)
View Source
const CRC_MAGIC_16 uint16 = 31
View Source
const HEADER_SIZE = 12
View Source
const RS_OP_COPY_N1_N1 = byte(0x45)
View Source
const RS_OP_COPY_N8_N8 = byte(0x54)

const RS_OP_COPY_N1_N2 = byte(0x46) const RS_OP_COPY_N1_N4 = byte(0x47) const RS_OP_COPY_N1_N8 = byte(0x48) const RS_OP_COPY_N2_N1 = byte(0x49) const RS_OP_COPY_N2_N2 = byte(0x4a) const RS_OP_COPY_N2_N4 = byte(0x4b) const RS_OP_COPY_N2_N8 = byte(0x4c) const RS_OP_COPY_N4_N1 = byte(0x4d) const RS_OP_COPY_N4_N2 = byte(0x4e) const RS_OP_COPY_N4_N4 = byte(0x4f) const RS_OP_COPY_N4_N8 = byte(0x50) const RS_OP_COPY_N8_N1 = byte(0x51) const RS_OP_COPY_N8_N2 = byte(0x52) const RS_OP_COPY_N8_N4 = byte(0x53)

View Source
const RS_OP_END = byte(0)
View Source
const RS_OP_LITERAL_1 = byte(0x1)
View Source
const RS_OP_LITERAL_64 = byte(0x40)
View Source
const RS_OP_LITERAL_N1 = byte(0x41)
View Source
const RS_OP_LITERAL_N2 = byte(0x42)
View Source
const RS_OP_LITERAL_N4 = byte(0x43)
View Source
const RS_OP_LITERAL_N8 = byte(0x44)

Variables

View Source
var BLAKE5_MAGIC = [4]byte{0x72, 0x73, 0x01, 0x37}
View Source
var DeltaMagic = []byte{0x72, 0x73, 0x02, 0x36}
View Source
var MD4_MAGIC = [4]byte{0x72, 0x73, 0x01, 0x36}

Functions

func ApplyPatch

func ApplyPatch(base []byte, patch []byte, output io.Writer) error

Types

type RsyncPatchWriter

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

func NewRsyncPatchWriter

func NewRsyncPatchWriter(sig []byte, output io.Writer) (*RsyncPatchWriter, error)

func (*RsyncPatchWriter) AssertSameCrc

func (self *RsyncPatchWriter) AssertSameCrc()

func (*RsyncPatchWriter) Close

func (self *RsyncPatchWriter) Close() error

func (*RsyncPatchWriter) Write

func (self *RsyncPatchWriter) Write(data []byte) (int, error)

type Sig

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

type SigFile

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

func DeserializeSigFileView

func DeserializeSigFileView(on_disk_format []byte) (SigFile, error)

func NewSigFile

func NewSigFile(block_size uint32, buf []byte, crypto_sig_size uint32) SigFile

func (*SigFile) Serialize

func (self *SigFile) Serialize(output io.Writer) error

type SigFileStat

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

type SigHint

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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