2022-07-03 12:08:30 +02:00
|
|
|
// Code generated by command: go run gen.go -out ../encodeblock_amd64.s -stubs ../encodeblock_amd64.go -pkg=s2. DO NOT EDIT.
|
|
|
|
|
2022-08-31 12:06:14 +02:00
|
|
|
//go:build !appengine && !noasm && gc && !noasm
|
2022-07-03 12:08:30 +02:00
|
|
|
|
|
|
|
package s2
|
|
|
|
|
2022-09-28 19:30:40 +02:00
|
|
|
func _dummy_()
|
|
|
|
|
2022-07-03 12:08:30 +02:00
|
|
|
// encodeBlockAsm encodes a non-empty src to a guaranteed-large-enough dst.
|
|
|
|
// Maximum input 4294967295 bytes.
|
|
|
|
// It assumes that the varint-encoded length of the decompressed bytes has already been written.
|
|
|
|
//
|
|
|
|
//go:noescape
|
2024-10-14 11:46:02 +02:00
|
|
|
func encodeBlockAsm(dst []byte, src []byte, tmp *[65536]byte) int
|
2022-07-03 12:08:30 +02:00
|
|
|
|
|
|
|
// encodeBlockAsm4MB encodes a non-empty src to a guaranteed-large-enough dst.
|
|
|
|
// Maximum input 4194304 bytes.
|
|
|
|
// It assumes that the varint-encoded length of the decompressed bytes has already been written.
|
|
|
|
//
|
|
|
|
//go:noescape
|
2024-10-14 11:46:02 +02:00
|
|
|
func encodeBlockAsm4MB(dst []byte, src []byte, tmp *[65536]byte) int
|
2022-07-03 12:08:30 +02:00
|
|
|
|
|
|
|
// encodeBlockAsm12B encodes a non-empty src to a guaranteed-large-enough dst.
|
|
|
|
// Maximum input 16383 bytes.
|
|
|
|
// It assumes that the varint-encoded length of the decompressed bytes has already been written.
|
|
|
|
//
|
|
|
|
//go:noescape
|
2024-10-14 11:46:02 +02:00
|
|
|
func encodeBlockAsm12B(dst []byte, src []byte, tmp *[16384]byte) int
|
2022-07-03 12:08:30 +02:00
|
|
|
|
|
|
|
// encodeBlockAsm10B encodes a non-empty src to a guaranteed-large-enough dst.
|
|
|
|
// Maximum input 4095 bytes.
|
|
|
|
// It assumes that the varint-encoded length of the decompressed bytes has already been written.
|
|
|
|
//
|
|
|
|
//go:noescape
|
2024-10-14 11:46:02 +02:00
|
|
|
func encodeBlockAsm10B(dst []byte, src []byte, tmp *[4096]byte) int
|
2022-07-03 12:08:30 +02:00
|
|
|
|
|
|
|
// encodeBlockAsm8B encodes a non-empty src to a guaranteed-large-enough dst.
|
|
|
|
// Maximum input 511 bytes.
|
|
|
|
// It assumes that the varint-encoded length of the decompressed bytes has already been written.
|
|
|
|
//
|
|
|
|
//go:noescape
|
2024-10-14 11:46:02 +02:00
|
|
|
func encodeBlockAsm8B(dst []byte, src []byte, tmp *[1024]byte) int
|
2022-07-03 12:08:30 +02:00
|
|
|
|
|
|
|
// encodeBetterBlockAsm encodes a non-empty src to a guaranteed-large-enough dst.
|
|
|
|
// Maximum input 4294967295 bytes.
|
|
|
|
// It assumes that the varint-encoded length of the decompressed bytes has already been written.
|
|
|
|
//
|
|
|
|
//go:noescape
|
2024-10-14 11:46:02 +02:00
|
|
|
func encodeBetterBlockAsm(dst []byte, src []byte, tmp *[589824]byte) int
|
2022-07-03 12:08:30 +02:00
|
|
|
|
|
|
|
// encodeBetterBlockAsm4MB encodes a non-empty src to a guaranteed-large-enough dst.
|
|
|
|
// Maximum input 4194304 bytes.
|
|
|
|
// It assumes that the varint-encoded length of the decompressed bytes has already been written.
|
|
|
|
//
|
|
|
|
//go:noescape
|
2024-10-14 11:46:02 +02:00
|
|
|
func encodeBetterBlockAsm4MB(dst []byte, src []byte, tmp *[589824]byte) int
|
2022-07-03 12:08:30 +02:00
|
|
|
|
|
|
|
// encodeBetterBlockAsm12B encodes a non-empty src to a guaranteed-large-enough dst.
|
|
|
|
// Maximum input 16383 bytes.
|
|
|
|
// It assumes that the varint-encoded length of the decompressed bytes has already been written.
|
|
|
|
//
|
|
|
|
//go:noescape
|
2024-10-14 11:46:02 +02:00
|
|
|
func encodeBetterBlockAsm12B(dst []byte, src []byte, tmp *[81920]byte) int
|
2022-07-03 12:08:30 +02:00
|
|
|
|
|
|
|
// encodeBetterBlockAsm10B encodes a non-empty src to a guaranteed-large-enough dst.
|
|
|
|
// Maximum input 4095 bytes.
|
|
|
|
// It assumes that the varint-encoded length of the decompressed bytes has already been written.
|
|
|
|
//
|
|
|
|
//go:noescape
|
2024-10-14 11:46:02 +02:00
|
|
|
func encodeBetterBlockAsm10B(dst []byte, src []byte, tmp *[20480]byte) int
|
2022-07-03 12:08:30 +02:00
|
|
|
|
|
|
|
// encodeBetterBlockAsm8B encodes a non-empty src to a guaranteed-large-enough dst.
|
|
|
|
// Maximum input 511 bytes.
|
|
|
|
// It assumes that the varint-encoded length of the decompressed bytes has already been written.
|
|
|
|
//
|
|
|
|
//go:noescape
|
2024-10-14 11:46:02 +02:00
|
|
|
func encodeBetterBlockAsm8B(dst []byte, src []byte, tmp *[5120]byte) int
|
2022-07-03 12:08:30 +02:00
|
|
|
|
|
|
|
// encodeSnappyBlockAsm encodes a non-empty src to a guaranteed-large-enough dst.
|
|
|
|
// Maximum input 4294967295 bytes.
|
|
|
|
// It assumes that the varint-encoded length of the decompressed bytes has already been written.
|
|
|
|
//
|
|
|
|
//go:noescape
|
2024-10-14 11:46:02 +02:00
|
|
|
func encodeSnappyBlockAsm(dst []byte, src []byte, tmp *[65536]byte) int
|
2022-07-03 12:08:30 +02:00
|
|
|
|
|
|
|
// encodeSnappyBlockAsm64K encodes a non-empty src to a guaranteed-large-enough dst.
|
|
|
|
// Maximum input 65535 bytes.
|
|
|
|
// It assumes that the varint-encoded length of the decompressed bytes has already been written.
|
|
|
|
//
|
|
|
|
//go:noescape
|
2024-10-14 11:46:02 +02:00
|
|
|
func encodeSnappyBlockAsm64K(dst []byte, src []byte, tmp *[65536]byte) int
|
2022-07-03 12:08:30 +02:00
|
|
|
|
|
|
|
// encodeSnappyBlockAsm12B encodes a non-empty src to a guaranteed-large-enough dst.
|
|
|
|
// Maximum input 16383 bytes.
|
|
|
|
// It assumes that the varint-encoded length of the decompressed bytes has already been written.
|
|
|
|
//
|
|
|
|
//go:noescape
|
2024-10-14 11:46:02 +02:00
|
|
|
func encodeSnappyBlockAsm12B(dst []byte, src []byte, tmp *[16384]byte) int
|
2022-07-03 12:08:30 +02:00
|
|
|
|
|
|
|
// encodeSnappyBlockAsm10B encodes a non-empty src to a guaranteed-large-enough dst.
|
|
|
|
// Maximum input 4095 bytes.
|
|
|
|
// It assumes that the varint-encoded length of the decompressed bytes has already been written.
|
|
|
|
//
|
|
|
|
//go:noescape
|
2024-10-14 11:46:02 +02:00
|
|
|
func encodeSnappyBlockAsm10B(dst []byte, src []byte, tmp *[4096]byte) int
|
2022-07-03 12:08:30 +02:00
|
|
|
|
|
|
|
// encodeSnappyBlockAsm8B encodes a non-empty src to a guaranteed-large-enough dst.
|
|
|
|
// Maximum input 511 bytes.
|
|
|
|
// It assumes that the varint-encoded length of the decompressed bytes has already been written.
|
|
|
|
//
|
|
|
|
//go:noescape
|
2024-10-14 11:46:02 +02:00
|
|
|
func encodeSnappyBlockAsm8B(dst []byte, src []byte, tmp *[1024]byte) int
|
2022-07-03 12:08:30 +02:00
|
|
|
|
|
|
|
// encodeSnappyBetterBlockAsm encodes a non-empty src to a guaranteed-large-enough dst.
|
|
|
|
// Maximum input 4294967295 bytes.
|
|
|
|
// It assumes that the varint-encoded length of the decompressed bytes has already been written.
|
|
|
|
//
|
|
|
|
//go:noescape
|
2024-10-14 11:46:02 +02:00
|
|
|
func encodeSnappyBetterBlockAsm(dst []byte, src []byte, tmp *[589824]byte) int
|
2022-07-03 12:08:30 +02:00
|
|
|
|
|
|
|
// encodeSnappyBetterBlockAsm64K encodes a non-empty src to a guaranteed-large-enough dst.
|
|
|
|
// Maximum input 65535 bytes.
|
|
|
|
// It assumes that the varint-encoded length of the decompressed bytes has already been written.
|
|
|
|
//
|
|
|
|
//go:noescape
|
2024-10-14 11:46:02 +02:00
|
|
|
func encodeSnappyBetterBlockAsm64K(dst []byte, src []byte, tmp *[294912]byte) int
|
2022-07-03 12:08:30 +02:00
|
|
|
|
|
|
|
// encodeSnappyBetterBlockAsm12B encodes a non-empty src to a guaranteed-large-enough dst.
|
|
|
|
// Maximum input 16383 bytes.
|
|
|
|
// It assumes that the varint-encoded length of the decompressed bytes has already been written.
|
|
|
|
//
|
|
|
|
//go:noescape
|
2024-10-14 11:46:02 +02:00
|
|
|
func encodeSnappyBetterBlockAsm12B(dst []byte, src []byte, tmp *[81920]byte) int
|
2022-07-03 12:08:30 +02:00
|
|
|
|
|
|
|
// encodeSnappyBetterBlockAsm10B encodes a non-empty src to a guaranteed-large-enough dst.
|
|
|
|
// Maximum input 4095 bytes.
|
|
|
|
// It assumes that the varint-encoded length of the decompressed bytes has already been written.
|
|
|
|
//
|
|
|
|
//go:noescape
|
2024-10-14 11:46:02 +02:00
|
|
|
func encodeSnappyBetterBlockAsm10B(dst []byte, src []byte, tmp *[20480]byte) int
|
2022-07-03 12:08:30 +02:00
|
|
|
|
|
|
|
// encodeSnappyBetterBlockAsm8B encodes a non-empty src to a guaranteed-large-enough dst.
|
|
|
|
// Maximum input 511 bytes.
|
|
|
|
// It assumes that the varint-encoded length of the decompressed bytes has already been written.
|
|
|
|
//
|
|
|
|
//go:noescape
|
2024-10-14 11:46:02 +02:00
|
|
|
func encodeSnappyBetterBlockAsm8B(dst []byte, src []byte, tmp *[5120]byte) int
|
2022-07-03 12:08:30 +02:00
|
|
|
|
2023-03-30 23:39:55 +02:00
|
|
|
// calcBlockSize encodes a non-empty src to a guaranteed-large-enough dst.
|
|
|
|
// Maximum input 4294967295 bytes.
|
|
|
|
// It assumes that the varint-encoded length of the decompressed bytes has already been written.
|
|
|
|
//
|
|
|
|
//go:noescape
|
2024-10-14 11:46:02 +02:00
|
|
|
func calcBlockSize(src []byte, tmp *[32768]byte) int
|
2023-03-30 23:39:55 +02:00
|
|
|
|
|
|
|
// calcBlockSizeSmall encodes a non-empty src to a guaranteed-large-enough dst.
|
|
|
|
// Maximum input 1024 bytes.
|
|
|
|
// It assumes that the varint-encoded length of the decompressed bytes has already been written.
|
|
|
|
//
|
|
|
|
//go:noescape
|
2024-10-14 11:46:02 +02:00
|
|
|
func calcBlockSizeSmall(src []byte, tmp *[2048]byte) int
|
2023-03-30 23:39:55 +02:00
|
|
|
|
2022-07-03 12:08:30 +02:00
|
|
|
// emitLiteral writes a literal chunk and returns the number of bytes written.
|
|
|
|
//
|
|
|
|
// It assumes that:
|
2023-02-27 10:21:58 +01:00
|
|
|
//
|
|
|
|
// dst is long enough to hold the encoded bytes with margin of 0 bytes
|
|
|
|
// 0 <= len(lit) && len(lit) <= math.MaxUint32
|
2022-07-03 12:08:30 +02:00
|
|
|
//
|
|
|
|
//go:noescape
|
|
|
|
func emitLiteral(dst []byte, lit []byte) int
|
|
|
|
|
|
|
|
// emitRepeat writes a repeat chunk and returns the number of bytes written.
|
|
|
|
// Length must be at least 4 and < 1<<32
|
|
|
|
//
|
|
|
|
//go:noescape
|
|
|
|
func emitRepeat(dst []byte, offset int, length int) int
|
|
|
|
|
|
|
|
// emitCopy writes a copy chunk and returns the number of bytes written.
|
|
|
|
//
|
|
|
|
// It assumes that:
|
2023-02-27 10:21:58 +01:00
|
|
|
//
|
|
|
|
// dst is long enough to hold the encoded bytes
|
|
|
|
// 1 <= offset && offset <= math.MaxUint32
|
|
|
|
// 4 <= length && length <= 1 << 24
|
2022-07-03 12:08:30 +02:00
|
|
|
//
|
|
|
|
//go:noescape
|
|
|
|
func emitCopy(dst []byte, offset int, length int) int
|
|
|
|
|
|
|
|
// emitCopyNoRepeat writes a copy chunk and returns the number of bytes written.
|
|
|
|
//
|
|
|
|
// It assumes that:
|
2023-02-27 10:21:58 +01:00
|
|
|
//
|
|
|
|
// dst is long enough to hold the encoded bytes
|
|
|
|
// 1 <= offset && offset <= math.MaxUint32
|
|
|
|
// 4 <= length && length <= 1 << 24
|
2022-07-03 12:08:30 +02:00
|
|
|
//
|
|
|
|
//go:noescape
|
|
|
|
func emitCopyNoRepeat(dst []byte, offset int, length int) int
|
|
|
|
|
|
|
|
// matchLen returns how many bytes match in a and b
|
|
|
|
//
|
|
|
|
// It assumes that:
|
2023-02-27 10:21:58 +01:00
|
|
|
//
|
|
|
|
// len(a) <= len(b)
|
2022-07-03 12:08:30 +02:00
|
|
|
//
|
|
|
|
//go:noescape
|
|
|
|
func matchLen(a []byte, b []byte) int
|
2023-03-30 23:39:55 +02:00
|
|
|
|
|
|
|
// cvtLZ4Block converts an LZ4 block to S2
|
|
|
|
//
|
|
|
|
//go:noescape
|
|
|
|
func cvtLZ4BlockAsm(dst []byte, src []byte) (uncompressed int, dstUsed int)
|
|
|
|
|
|
|
|
// cvtLZ4sBlock converts an LZ4s block to S2
|
|
|
|
//
|
|
|
|
//go:noescape
|
|
|
|
func cvtLZ4sBlockAsm(dst []byte, src []byte) (uncompressed int, dstUsed int)
|
|
|
|
|
|
|
|
// cvtLZ4Block converts an LZ4 block to Snappy
|
|
|
|
//
|
|
|
|
//go:noescape
|
|
|
|
func cvtLZ4BlockSnappyAsm(dst []byte, src []byte) (uncompressed int, dstUsed int)
|
|
|
|
|
|
|
|
// cvtLZ4sBlock converts an LZ4s block to Snappy
|
|
|
|
//
|
|
|
|
//go:noescape
|
|
|
|
func cvtLZ4sBlockSnappyAsm(dst []byte, src []byte) (uncompressed int, dstUsed int)
|