encodeblock_amd64.go 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228
  1. // Code generated by command: go run gen.go -out ../encodeblock_amd64.s -stubs ../encodeblock_amd64.go -pkg=s2. DO NOT EDIT.
  2. //go:build !appengine && !noasm && gc && !noasm
  3. package s2
  4. func _dummy_()
  5. // encodeBlockAsm encodes a non-empty src to a guaranteed-large-enough dst.
  6. // Maximum input 4294967295 bytes.
  7. // It assumes that the varint-encoded length of the decompressed bytes has already been written.
  8. //
  9. //go:noescape
  10. func encodeBlockAsm(dst []byte, src []byte) int
  11. // encodeBlockAsm4MB encodes a non-empty src to a guaranteed-large-enough dst.
  12. // Maximum input 4194304 bytes.
  13. // It assumes that the varint-encoded length of the decompressed bytes has already been written.
  14. //
  15. //go:noescape
  16. func encodeBlockAsm4MB(dst []byte, src []byte) int
  17. // encodeBlockAsm12B encodes a non-empty src to a guaranteed-large-enough dst.
  18. // Maximum input 16383 bytes.
  19. // It assumes that the varint-encoded length of the decompressed bytes has already been written.
  20. //
  21. //go:noescape
  22. func encodeBlockAsm12B(dst []byte, src []byte) int
  23. // encodeBlockAsm10B encodes a non-empty src to a guaranteed-large-enough dst.
  24. // Maximum input 4095 bytes.
  25. // It assumes that the varint-encoded length of the decompressed bytes has already been written.
  26. //
  27. //go:noescape
  28. func encodeBlockAsm10B(dst []byte, src []byte) int
  29. // encodeBlockAsm8B encodes a non-empty src to a guaranteed-large-enough dst.
  30. // Maximum input 511 bytes.
  31. // It assumes that the varint-encoded length of the decompressed bytes has already been written.
  32. //
  33. //go:noescape
  34. func encodeBlockAsm8B(dst []byte, src []byte) int
  35. // encodeBetterBlockAsm encodes a non-empty src to a guaranteed-large-enough dst.
  36. // Maximum input 4294967295 bytes.
  37. // It assumes that the varint-encoded length of the decompressed bytes has already been written.
  38. //
  39. //go:noescape
  40. func encodeBetterBlockAsm(dst []byte, src []byte) int
  41. // encodeBetterBlockAsm4MB encodes a non-empty src to a guaranteed-large-enough dst.
  42. // Maximum input 4194304 bytes.
  43. // It assumes that the varint-encoded length of the decompressed bytes has already been written.
  44. //
  45. //go:noescape
  46. func encodeBetterBlockAsm4MB(dst []byte, src []byte) int
  47. // encodeBetterBlockAsm12B encodes a non-empty src to a guaranteed-large-enough dst.
  48. // Maximum input 16383 bytes.
  49. // It assumes that the varint-encoded length of the decompressed bytes has already been written.
  50. //
  51. //go:noescape
  52. func encodeBetterBlockAsm12B(dst []byte, src []byte) int
  53. // encodeBetterBlockAsm10B encodes a non-empty src to a guaranteed-large-enough dst.
  54. // Maximum input 4095 bytes.
  55. // It assumes that the varint-encoded length of the decompressed bytes has already been written.
  56. //
  57. //go:noescape
  58. func encodeBetterBlockAsm10B(dst []byte, src []byte) int
  59. // encodeBetterBlockAsm8B encodes a non-empty src to a guaranteed-large-enough dst.
  60. // Maximum input 511 bytes.
  61. // It assumes that the varint-encoded length of the decompressed bytes has already been written.
  62. //
  63. //go:noescape
  64. func encodeBetterBlockAsm8B(dst []byte, src []byte) int
  65. // encodeSnappyBlockAsm encodes a non-empty src to a guaranteed-large-enough dst.
  66. // Maximum input 4294967295 bytes.
  67. // It assumes that the varint-encoded length of the decompressed bytes has already been written.
  68. //
  69. //go:noescape
  70. func encodeSnappyBlockAsm(dst []byte, src []byte) int
  71. // encodeSnappyBlockAsm64K encodes a non-empty src to a guaranteed-large-enough dst.
  72. // Maximum input 65535 bytes.
  73. // It assumes that the varint-encoded length of the decompressed bytes has already been written.
  74. //
  75. //go:noescape
  76. func encodeSnappyBlockAsm64K(dst []byte, src []byte) int
  77. // encodeSnappyBlockAsm12B encodes a non-empty src to a guaranteed-large-enough dst.
  78. // Maximum input 16383 bytes.
  79. // It assumes that the varint-encoded length of the decompressed bytes has already been written.
  80. //
  81. //go:noescape
  82. func encodeSnappyBlockAsm12B(dst []byte, src []byte) int
  83. // encodeSnappyBlockAsm10B encodes a non-empty src to a guaranteed-large-enough dst.
  84. // Maximum input 4095 bytes.
  85. // It assumes that the varint-encoded length of the decompressed bytes has already been written.
  86. //
  87. //go:noescape
  88. func encodeSnappyBlockAsm10B(dst []byte, src []byte) int
  89. // encodeSnappyBlockAsm8B encodes a non-empty src to a guaranteed-large-enough dst.
  90. // Maximum input 511 bytes.
  91. // It assumes that the varint-encoded length of the decompressed bytes has already been written.
  92. //
  93. //go:noescape
  94. func encodeSnappyBlockAsm8B(dst []byte, src []byte) int
  95. // encodeSnappyBetterBlockAsm encodes a non-empty src to a guaranteed-large-enough dst.
  96. // Maximum input 4294967295 bytes.
  97. // It assumes that the varint-encoded length of the decompressed bytes has already been written.
  98. //
  99. //go:noescape
  100. func encodeSnappyBetterBlockAsm(dst []byte, src []byte) int
  101. // encodeSnappyBetterBlockAsm64K encodes a non-empty src to a guaranteed-large-enough dst.
  102. // Maximum input 65535 bytes.
  103. // It assumes that the varint-encoded length of the decompressed bytes has already been written.
  104. //
  105. //go:noescape
  106. func encodeSnappyBetterBlockAsm64K(dst []byte, src []byte) int
  107. // encodeSnappyBetterBlockAsm12B encodes a non-empty src to a guaranteed-large-enough dst.
  108. // Maximum input 16383 bytes.
  109. // It assumes that the varint-encoded length of the decompressed bytes has already been written.
  110. //
  111. //go:noescape
  112. func encodeSnappyBetterBlockAsm12B(dst []byte, src []byte) int
  113. // encodeSnappyBetterBlockAsm10B encodes a non-empty src to a guaranteed-large-enough dst.
  114. // Maximum input 4095 bytes.
  115. // It assumes that the varint-encoded length of the decompressed bytes has already been written.
  116. //
  117. //go:noescape
  118. func encodeSnappyBetterBlockAsm10B(dst []byte, src []byte) int
  119. // encodeSnappyBetterBlockAsm8B encodes a non-empty src to a guaranteed-large-enough dst.
  120. // Maximum input 511 bytes.
  121. // It assumes that the varint-encoded length of the decompressed bytes has already been written.
  122. //
  123. //go:noescape
  124. func encodeSnappyBetterBlockAsm8B(dst []byte, src []byte) int
  125. // calcBlockSize encodes a non-empty src to a guaranteed-large-enough dst.
  126. // Maximum input 4294967295 bytes.
  127. // It assumes that the varint-encoded length of the decompressed bytes has already been written.
  128. //
  129. //go:noescape
  130. func calcBlockSize(src []byte) int
  131. // calcBlockSizeSmall encodes a non-empty src to a guaranteed-large-enough dst.
  132. // Maximum input 1024 bytes.
  133. // It assumes that the varint-encoded length of the decompressed bytes has already been written.
  134. //
  135. //go:noescape
  136. func calcBlockSizeSmall(src []byte) int
  137. // emitLiteral writes a literal chunk and returns the number of bytes written.
  138. //
  139. // It assumes that:
  140. //
  141. // dst is long enough to hold the encoded bytes with margin of 0 bytes
  142. // 0 <= len(lit) && len(lit) <= math.MaxUint32
  143. //
  144. //go:noescape
  145. func emitLiteral(dst []byte, lit []byte) int
  146. // emitRepeat writes a repeat chunk and returns the number of bytes written.
  147. // Length must be at least 4 and < 1<<32
  148. //
  149. //go:noescape
  150. func emitRepeat(dst []byte, offset int, length int) int
  151. // emitCopy writes a copy chunk and returns the number of bytes written.
  152. //
  153. // It assumes that:
  154. //
  155. // dst is long enough to hold the encoded bytes
  156. // 1 <= offset && offset <= math.MaxUint32
  157. // 4 <= length && length <= 1 << 24
  158. //
  159. //go:noescape
  160. func emitCopy(dst []byte, offset int, length int) int
  161. // emitCopyNoRepeat writes a copy chunk and returns the number of bytes written.
  162. //
  163. // It assumes that:
  164. //
  165. // dst is long enough to hold the encoded bytes
  166. // 1 <= offset && offset <= math.MaxUint32
  167. // 4 <= length && length <= 1 << 24
  168. //
  169. //go:noescape
  170. func emitCopyNoRepeat(dst []byte, offset int, length int) int
  171. // matchLen returns how many bytes match in a and b
  172. //
  173. // It assumes that:
  174. //
  175. // len(a) <= len(b)
  176. //
  177. //go:noescape
  178. func matchLen(a []byte, b []byte) int
  179. // cvtLZ4Block converts an LZ4 block to S2
  180. //
  181. //go:noescape
  182. func cvtLZ4BlockAsm(dst []byte, src []byte) (uncompressed int, dstUsed int)
  183. // cvtLZ4sBlock converts an LZ4s block to S2
  184. //
  185. //go:noescape
  186. func cvtLZ4sBlockAsm(dst []byte, src []byte) (uncompressed int, dstUsed int)
  187. // cvtLZ4Block converts an LZ4 block to Snappy
  188. //
  189. //go:noescape
  190. func cvtLZ4BlockSnappyAsm(dst []byte, src []byte) (uncompressed int, dstUsed int)
  191. // cvtLZ4sBlock converts an LZ4s block to Snappy
  192. //
  193. //go:noescape
  194. func cvtLZ4sBlockSnappyAsm(dst []byte, src []byte) (uncompressed int, dstUsed int)