From 4a4b55fda518ad2869dd9947118e4a5707edd46a Mon Sep 17 00:00:00 2001 From: Yaroslav Stepanchuk Date: Mon, 15 Jan 2024 22:36:09 +0200 Subject: [PATCH] Make defaultMaxByteSliceSize equal to 1 MiB --- config.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config.go b/config.go index ad299a7d..647ead4a 100644 --- a/config.go +++ b/config.go @@ -8,7 +8,7 @@ import ( "github.com/modern-go/reflect2" ) -const maxByteSliceSize = 1024 * 1024 +const defaultMaxByteSliceSize = 1_048_576 // 1 MiB // DefaultConfig is the default API. var DefaultConfig = Config{}.Freeze() @@ -262,7 +262,7 @@ func (c *frozenConfig) getBlockLength() int { func (c *frozenConfig) getMaxByteSliceSize() int { size := c.config.MaxByteSliceSize if size == 0 { - return maxByteSliceSize + return defaultMaxByteSliceSize } return size }