summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/glycerine
diff options
context:
space:
mode:
authorMura Li <typeless@users.noreply.github.com>2019-03-27 19:15:23 +0800
committerLunny Xiao <xiaolunwen@gmail.com>2019-03-27 19:15:23 +0800
commitd77176912bccf1dc0ad93366df55f00fee23b498 (patch)
tree309fc6350f77f4061360160b88343360d45d5d24 /vendor/github.com/glycerine
parentd578b71d61ee8131e8abf7f538b93d8c6cc6fe6d (diff)
downloadgitea-d77176912bccf1dc0ad93366df55f00fee23b498.tar.gz
gitea-d77176912bccf1dc0ad93366df55f00fee23b498.zip
Use Go1.11 module (#5743)
* Migrate to go modules * make vendor * Update mvdan.cc/xurls * make vendor * Update code.gitea.io/git * make fmt-check * Update github.com/go-sql-driver/mysql * make vendor
Diffstat (limited to 'vendor/github.com/glycerine')
-rw-r--r--vendor/github.com/glycerine/go-unsnap-stream/.gitignore22
-rw-r--r--vendor/github.com/glycerine/go-unsnap-stream/README.md20
-rw-r--r--vendor/github.com/glycerine/go-unsnap-stream/binary.datbin0 -> 5592 bytes
-rw-r--r--vendor/github.com/glycerine/go-unsnap-stream/binary.dat.snappybin0 -> 5610 bytes
-rw-r--r--vendor/github.com/glycerine/go-unsnap-stream/unenc.txt1
-rw-r--r--vendor/github.com/glycerine/go-unsnap-stream/unenc.txt.snappybin0 -> 31 bytes
6 files changed, 43 insertions, 0 deletions
diff --git a/vendor/github.com/glycerine/go-unsnap-stream/.gitignore b/vendor/github.com/glycerine/go-unsnap-stream/.gitignore
new file mode 100644
index 0000000000..00268614f0
--- /dev/null
+++ b/vendor/github.com/glycerine/go-unsnap-stream/.gitignore
@@ -0,0 +1,22 @@
+# Compiled Object files, Static and Dynamic libs (Shared Objects)
+*.o
+*.a
+*.so
+
+# Folders
+_obj
+_test
+
+# Architecture specific extensions/prefixes
+*.[568vq]
+[568vq].out
+
+*.cgo1.go
+*.cgo2.c
+_cgo_defun.c
+_cgo_gotypes.go
+_cgo_export.*
+
+_testmain.go
+
+*.exe
diff --git a/vendor/github.com/glycerine/go-unsnap-stream/README.md b/vendor/github.com/glycerine/go-unsnap-stream/README.md
new file mode 100644
index 0000000000..b1b8c74751
--- /dev/null
+++ b/vendor/github.com/glycerine/go-unsnap-stream/README.md
@@ -0,0 +1,20 @@
+go-unsnap-stream
+================
+
+This is a small golang library for decoding and encoding the snappy *streaming* format, specified here: https://github.com/google/snappy/blob/master/framing_format.txt
+
+Note that the *streaming or framing format* for snappy is different from snappy itself. Think of it as a train of boxcars: the streaming format breaks your data in chunks, applies snappy to each chunk alone, then puts a thin wrapper around the chunk, and sends it along in turn. You can begin decoding before receiving everything. And memory requirements for decoding are sane.
+
+Strangely, though the streaming format was first proposed in Go[1][2], it was never upated, and I could not locate any other library for Go that would handle the streaming/framed snappy format. Hence this implementation of the spec. There is a command line tool[3] that has a C implementation, but this is the only Go implementation that I am aware of. The reference for the framing/streaming spec seems to be the python implementation[4].
+
+For binary compatibility with the python implementation, one could use the C-snappy compressor/decompressor code directly; using github.com/dgryski/go-csnappy. In fact we did this for a while to verify byte-for-byte compatiblity, as the native Go implementation produces slightly different binary compression (still conformant with the standard of course), which made test-diffs harder, and some have complained about it being slower than the C.
+
+However, while the c-snappy was useful for checking compatibility, it introduced dependencies on external C libraries (both the c-snappy library and the C standard library). Our go binary executable that used the go-unsnap-stream library was no longer standalone, and deployment was painful if not impossible if the target had a different C standard library. So we've gone back to using the snappy-go implementation (entirely in Go) for ease of deployment. See the comments at the top of unsnap.go if you wish to use c-snappy instead.
+
+[1] https://groups.google.com/forum/#!msg/snappy-compression/qvLNe2cSH9s/R19oBC-p7g4J
+
+[2] https://codereview.appspot.com/5167058
+
+[3] https://github.com/kubo/snzip
+
+[4] https://pypi.python.org/pypi/python-snappy \ No newline at end of file
diff --git a/vendor/github.com/glycerine/go-unsnap-stream/binary.dat b/vendor/github.com/glycerine/go-unsnap-stream/binary.dat
new file mode 100644
index 0000000000..f31eee2e24
--- /dev/null
+++ b/vendor/github.com/glycerine/go-unsnap-stream/binary.dat
Binary files differ
diff --git a/vendor/github.com/glycerine/go-unsnap-stream/binary.dat.snappy b/vendor/github.com/glycerine/go-unsnap-stream/binary.dat.snappy
new file mode 100644
index 0000000000..ed37024293
--- /dev/null
+++ b/vendor/github.com/glycerine/go-unsnap-stream/binary.dat.snappy
Binary files differ
diff --git a/vendor/github.com/glycerine/go-unsnap-stream/unenc.txt b/vendor/github.com/glycerine/go-unsnap-stream/unenc.txt
new file mode 100644
index 0000000000..5f50279394
--- /dev/null
+++ b/vendor/github.com/glycerine/go-unsnap-stream/unenc.txt
@@ -0,0 +1 @@
+hello_snappy
diff --git a/vendor/github.com/glycerine/go-unsnap-stream/unenc.txt.snappy b/vendor/github.com/glycerine/go-unsnap-stream/unenc.txt.snappy
new file mode 100644
index 0000000000..ba45ecd426
--- /dev/null
+++ b/vendor/github.com/glycerine/go-unsnap-stream/unenc.txt.snappy
Binary files differ