Documentation
¶
Index ¶
- func CRC32(path string) (n int64, checksum uint32, err error)
- type CRC32Reader
- type CRC32Resumable
- func (c *CRC32Resumable) BlockSize() int
- func (c *CRC32Resumable) Reseed(seed uint32)
- func (c *CRC32Resumable) Reset()
- func (c *CRC32Resumable) Size() int
- func (c *CRC32Resumable) Sum(b []byte) []byte
- func (c *CRC32Resumable) Sum32() uint32
- func (c *CRC32Resumable) Write(p []byte) (n int, err error)
- type CRC32Writer
- type ChecksumReader
- type ChecksumWriter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CRC32Reader ¶
type CRC32Reader struct {
// contains filtered or unexported fields
}
func NewCRC32Reader ¶
func NewCRC32Reader(r io.Reader) *CRC32Reader
func (*CRC32Reader) Hash ¶
func (rc *CRC32Reader) Hash() []byte
func (*CRC32Reader) N ¶
func (rc *CRC32Reader) N() int
func (*CRC32Reader) Reset ¶
func (rc *CRC32Reader) Reset()
type CRC32Resumable ¶ added in v1.29.8
type CRC32Resumable struct {
// contains filtered or unexported fields
}
CRC32Resumable implements hash.Hash32 and supports reseeding. Always uses crc32.IEEE polynomial.
func NewCRC32Resumable ¶ added in v1.29.8
func NewCRC32Resumable(seed uint32) *CRC32Resumable
NewCRC32Resumable creates a new CRC32Resumable starting at a given CRC seed.
func (*CRC32Resumable) BlockSize ¶ added in v1.29.8
func (c *CRC32Resumable) BlockSize() int
BlockSize returns the block size of the hash (1).
func (*CRC32Resumable) Reseed ¶ added in v1.29.8
func (c *CRC32Resumable) Reseed(seed uint32)
Reseed manually sets a new CRC seed value.
func (*CRC32Resumable) Reset ¶ added in v1.29.8
func (c *CRC32Resumable) Reset()
Reset resets the CRC to zero.
func (*CRC32Resumable) Size ¶ added in v1.29.8
func (c *CRC32Resumable) Size() int
Size returns the number of bytes Sum will return (4).
func (*CRC32Resumable) Sum ¶ added in v1.29.8
func (c *CRC32Resumable) Sum(b []byte) []byte
Sum returns the checksum appended to b in big-endian order.
func (*CRC32Resumable) Sum32 ¶ added in v1.29.8
func (c *CRC32Resumable) Sum32() uint32
Sum32 returns the current CRC value.
type CRC32Writer ¶
type CRC32Writer struct {
// contains filtered or unexported fields
}
func NewCRC32Writer ¶
func NewCRC32Writer(w io.Writer) *CRC32Writer
func NewCRC32WriterWithSeed ¶ added in v1.29.8
func NewCRC32WriterWithSeed(w io.Writer, seed uint32) *CRC32Writer
func (*CRC32Writer) Hash ¶
func (wc *CRC32Writer) Hash() []byte
func (*CRC32Writer) N ¶
func (wc *CRC32Writer) N() int
func (*CRC32Writer) Reset ¶
func (wc *CRC32Writer) Reset()
Click to show internal directories.
Click to hide internal directories.