"vscode:/vscode.git/clone" did not exist on "3519dd1c6ee8cfd5afcf9989bb589747beccf6f7"
Commit 8d376acc authored by Michael Yang's avatar Michael Yang Committed by Michael Yang
Browse files

zero means zero

use a default of 1024 when asking for zero is confusing since most calls
seem to assume 0 means do not ready any data
parent dc1e81f0
...@@ -366,10 +366,6 @@ func DetectContentType(b []byte) string { ...@@ -366,10 +366,6 @@ func DetectContentType(b []byte) string {
// maxArraySize. If maxArraySize is 0, the default value of 1024 is used. If // maxArraySize. If maxArraySize is 0, the default value of 1024 is used. If
// the maxArraySize is negative, all arrays are collected. // the maxArraySize is negative, all arrays are collected.
func Decode(rs io.ReadSeeker, maxArraySize int) (*GGML, int64, error) { func Decode(rs io.ReadSeeker, maxArraySize int) (*GGML, int64, error) {
if maxArraySize == 0 {
maxArraySize = 1024
}
rs = bufioutil.NewBufferedSeeker(rs, 32<<10) rs = bufioutil.NewBufferedSeeker(rs, 32<<10)
var magic uint32 var magic uint32
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment