From 8891274ccd9a83fdd471fa5e7dcd87cf856a1d11 Mon Sep 17 00:00:00 2001 From: "Xinwei Xiong(cubxxw)" <3293172751nss@gmail.com> Date: Fri, 16 Jun 2023 12:23:39 +0800 Subject: [PATCH] feat: gitignore file Signed-off-by: Xinwei Xiong(cubxxw) <3293172751nss@gmail.com> --- .gitignore | 1 + internal/msggateway/compressor.go | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 40ffa04f2..7c282c207 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,7 @@ out-test .github .idea .exe +_output/ deploy/open_im_api deploy/open_im_msg_gateway diff --git a/internal/msggateway/compressor.go b/internal/msggateway/compressor.go index d518d6f6d..a37c74ccd 100644 --- a/internal/msggateway/compressor.go +++ b/internal/msggateway/compressor.go @@ -3,8 +3,9 @@ package msggateway import ( "bytes" "compress/gzip" - "github.com/OpenIMSDK/Open-IM-Server/pkg/utils" "io" + + "github.com/OpenIMSDK/Open-IM-Server/pkg/utils" ) type Compressor interface { @@ -29,6 +30,7 @@ func (g *GzipCompressor) Compress(rawData []byte) ([]byte, error) { } return gzipBuffer.Bytes(), nil } + func (g *GzipCompressor) DeCompress(compressedData []byte) ([]byte, error) { buff := bytes.NewBuffer(compressedData) reader, err := gzip.NewReader(buff)