1// Code generated by command: go run gen.go -out ../encodeblock_amd64.s -stubs ../encodeblock_amd64.go -pkg=s2. DO NOT EDIT.
2
3// +build !appengine
4// +build !noasm
5// +build gc
6
7package s2
8
9// encodeBlockAsm encodes a non-empty src to a guaranteed-large-enough dst.
10// Maximum input 4294967295 bytes.
11// It assumes that the varint-encoded length of the decompressed bytes has already been written.
12//
13//go:noescape
14func encodeBlockAsm(dst []byte, src []byte) int
15
16// encodeBlockAsm4MB encodes a non-empty src to a guaranteed-large-enough dst.
17// Maximum input 4194304 bytes.
18// It assumes that the varint-encoded length of the decompressed bytes has already been written.
19//
20//go:noescape
21func encodeBlockAsm4MB(dst []byte, src []byte) int
22
23// encodeBlockAsm12B encodes a non-empty src to a guaranteed-large-enough dst.
24// Maximum input 16383 bytes.
25// It assumes that the varint-encoded length of the decompressed bytes has already been written.
26//
27//go:noescape
28func encodeBlockAsm12B(dst []byte, src []byte) int
29
30// encodeBlockAsm10B encodes a non-empty src to a guaranteed-large-enough dst.
31// Maximum input 4095 bytes.
32// It assumes that the varint-encoded length of the decompressed bytes has already been written.
33//
34//go:noescape
35func encodeBlockAsm10B(dst []byte, src []byte) int
36
37// encodeBlockAsm8B encodes a non-empty src to a guaranteed-large-enough dst.
38// Maximum input 511 bytes.
39// It assumes that the varint-encoded length of the decompressed bytes has already been written.
40//
41//go:noescape
42func encodeBlockAsm8B(dst []byte, src []byte) int
43
44// encodeBetterBlockAsm encodes a non-empty src to a guaranteed-large-enough dst.
45// Maximum input 4294967295 bytes.
46// It assumes that the varint-encoded length of the decompressed bytes has already been written.
47//
48//go:noescape
49func encodeBetterBlockAsm(dst []byte, src []byte) int
50
51// encodeBetterBlockAsm4MB encodes a non-empty src to a guaranteed-large-enough dst.
52// Maximum input 4194304 bytes.
53// It assumes that the varint-encoded length of the decompressed bytes has already been written.
54//
55//go:noescape
56func encodeBetterBlockAsm4MB(dst []byte, src []byte) int
57
58// encodeBetterBlockAsm12B encodes a non-empty src to a guaranteed-large-enough dst.
59// Maximum input 16383 bytes.
60// It assumes that the varint-encoded length of the decompressed bytes has already been written.
61//
62//go:noescape
63func encodeBetterBlockAsm12B(dst []byte, src []byte) int
64
65// encodeBetterBlockAsm10B encodes a non-empty src to a guaranteed-large-enough dst.
66// Maximum input 4095 bytes.
67// It assumes that the varint-encoded length of the decompressed bytes has already been written.
68//
69//go:noescape
70func encodeBetterBlockAsm10B(dst []byte, src []byte) int
71
72// encodeBetterBlockAsm8B encodes a non-empty src to a guaranteed-large-enough dst.
73// Maximum input 511 bytes.
74// It assumes that the varint-encoded length of the decompressed bytes has already been written.
75//
76//go:noescape
77func encodeBetterBlockAsm8B(dst []byte, src []byte) int
78
79// encodeSnappyBlockAsm encodes a non-empty src to a guaranteed-large-enough dst.
80// Maximum input 4294967295 bytes.
81// It assumes that the varint-encoded length of the decompressed bytes has already been written.
82//
83//go:noescape
84func encodeSnappyBlockAsm(dst []byte, src []byte) int
85
86// encodeSnappyBlockAsm12B encodes a non-empty src to a guaranteed-large-enough dst.
87// Maximum input 16383 bytes.
88// It assumes that the varint-encoded length of the decompressed bytes has already been written.
89//
90//go:noescape
91func encodeSnappyBlockAsm12B(dst []byte, src []byte) int
92
93// encodeSnappyBlockAsm10B encodes a non-empty src to a guaranteed-large-enough dst.
94// Maximum input 4095 bytes.
95// It assumes that the varint-encoded length of the decompressed bytes has already been written.
96//
97//go:noescape
98func encodeSnappyBlockAsm10B(dst []byte, src []byte) int
99
100// encodeSnappyBlockAsm8B encodes a non-empty src to a guaranteed-large-enough dst.
101// Maximum input 511 bytes.
102// It assumes that the varint-encoded length of the decompressed bytes has already been written.
103//
104//go:noescape
105func encodeSnappyBlockAsm8B(dst []byte, src []byte) int
106
107// emitLiteral writes a literal chunk and returns the number of bytes written.
108//
109// It assumes that:
110//   dst is long enough to hold the encoded bytes
111//   0 <= len(lit) && len(lit) <= math.MaxUint32
112//
113//go:noescape
114func emitLiteral(dst []byte, lit []byte) int
115
116// emitRepeat writes a repeat chunk and returns the number of bytes written.
117// Length must be at least 4 and < 1<<32
118//
119//go:noescape
120func emitRepeat(dst []byte, offset int, length int) int
121
122// emitCopy writes a copy chunk and returns the number of bytes written.
123//
124// It assumes that:
125//   dst is long enough to hold the encoded bytes
126//   1 <= offset && offset <= math.MaxUint32
127//   4 <= length && length <= 1 << 24
128//
129//go:noescape
130func emitCopy(dst []byte, offset int, length int) int
131
132// emitCopyNoRepeat writes a copy chunk and returns the number of bytes written.
133//
134// It assumes that:
135//   dst is long enough to hold the encoded bytes
136//   1 <= offset && offset <= math.MaxUint32
137//   4 <= length && length <= 1 << 24
138//
139//go:noescape
140func emitCopyNoRepeat(dst []byte, offset int, length int) int
141
142// matchLen returns how many bytes match in a and b
143//
144// It assumes that:
145//   len(a) <= len(b)
146//
147//go:noescape
148func matchLen(a []byte, b []byte) int
149