diff --git a/api/utils.go b/api/utils.go index d7d7915c265f8b54b72da261a2468b702a7981f1..5beed9c37d71214fbfd84e278b50130b9a58ca4b 100644 --- a/api/utils.go +++ b/api/utils.go @@ -24,7 +24,7 @@ const ( ) // CompressJpeg takes a JPEG image in byte format -// and compresses it based on the above consts +// and compresses it based on desired output size func CompressJpeg(imgBytes []byte) ([]byte, error) { // Convert bytes to a reader imgBuf := bytes.NewReader(imgBytes) diff --git a/bindings/utils.go b/bindings/utils.go new file mode 100644 index 0000000000000000000000000000000000000000..b7249f6b910005962f27cbeb34679698e8c69c63 --- /dev/null +++ b/bindings/utils.go @@ -0,0 +1,17 @@ +//////////////////////////////////////////////////////////////////////////////// +// Copyright © 2021 Privategrity Corporation / +// / +// All rights reserved. / +//////////////////////////////////////////////////////////////////////////////// + +// Provides various utility functions for access over the bindings + +package bindings + +import "gitlab.com/elixxir/client/api" + +// CompressJpeg takes a JPEG image in byte format +// and compresses it based on desired output size +func CompressJpeg(imgBytes []byte) ([]byte, error) { + return api.CompressJpeg(imgBytes) +}