-
Notifications
You must be signed in to change notification settings - Fork 1
/
load.go
33 lines (29 loc) · 958 Bytes
/
load.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// Copyright 2023 The Yock Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
package zliblib
import (
"compress/zlib"
yocki "github.com/ansurfen/yock/interface"
)
func LoadZlib(yocks yocki.YockScheduler) {
lib := yocks.CreateLib("zlib")
lib.SetField(map[string]any{
// functions
"NewReader": zlib.NewReader,
"NewReaderDict": zlib.NewReaderDict,
"NewWriter": zlib.NewWriter,
"NewWriterLevel": zlib.NewWriterLevel,
"NewWriterLevelDict": zlib.NewWriterLevelDict,
// constants
"NoCompression": zlib.NoCompression,
"BestSpeed": zlib.BestSpeed,
"BestCompression": zlib.BestCompression,
"DefaultCompression": zlib.DefaultCompression,
"HuffmanOnly": zlib.HuffmanOnly,
// variable
"ErrChecksum": zlib.ErrChecksum,
"ErrDictionary": zlib.ErrDictionary,
"ErrHeader": zlib.ErrHeader,
})
}