Skip to content
This repository has been archived by the owner on Apr 23, 2024. It is now read-only.

Feature - Use godep and fix lz4 parameter bug #2

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
kittenhouse
bin/
vendor/
pkg/

80 changes: 80 additions & 0 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

46 changes: 46 additions & 0 deletions Gopkg.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Gopkg.toml example
#
# Refer to https://golang.github.io/dep/docs/Gopkg.toml.html
# for detailed Gopkg.toml documentation.
#
# required = ["github.com/user/thing/cmd/thing"]
# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"]
#
# [[constraint]]
# name = "github.com/user/project"
# version = "1.0.0"
#
# [[constraint]]
# name = "github.com/user/project2"
# branch = "dev"
# source = "github.com/myfork/project2"
#
# [[override]]
# name = "github.com/x/y"
# version = "2.4.0"
#
# [prune]
# non-go = false
# go-tests = true
# unused-packages = true


[[constraint]]
name = "github.com/pierrec/lz4"
version = "2.0.8"

[[constraint]]
name = "github.com/valyala/fasthttp"
version = "20180529.0.0"

[[constraint]]
branch = "master"
name = "github.com/vkcom/engine-go"

[[constraint]]
branch = "master"
name = "github.com/vkcom/kittenhouse"

[prune]
go-tests = true
unused-packages = true
4 changes: 3 additions & 1 deletion core/clickhouse/compress.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ const (
// https://github.com/yandex/ClickHouse/blob/5b113df16c6b9e6464cb55fb04280a8a5480794a/dbms/src/IO/CompressedReadBufferBase.cpp#L41
func compress(buf []byte) []byte {
var res = make([]byte, lz4.CompressBlockBound(len(buf))+compressedBlockHeaderSize+checksumSize)
compressedLen, _ := lz4.CompressBlock(buf, res[checksumSize+compressedBlockHeaderSize:], 0)
var hashTable [1 << 16]int

compressedLen, _ := lz4.CompressBlock(buf, res[checksumSize+compressedBlockHeaderSize:], hashTable[:])

res[checksumSize] = compressionMethodLz4
binary.LittleEndian.PutUint32(res[checksumSize+1:], compressedBlockHeaderSize+uint32(compressedLen))
Expand Down
31 changes: 0 additions & 31 deletions vendor/github.com/pierrec/lz4/.gitignore

This file was deleted.

8 changes: 0 additions & 8 deletions vendor/github.com/pierrec/lz4/.travis.yml

This file was deleted.

28 changes: 0 additions & 28 deletions vendor/github.com/pierrec/lz4/LICENSE

This file was deleted.

31 changes: 0 additions & 31 deletions vendor/github.com/pierrec/lz4/README.md

This file was deleted.

Loading