新增压缩功能-LZS算法

This commit is contained in:
lanrenwo
2023-01-17 12:09:04 +08:00
parent 70c82b8baa
commit 768e137ff9
12 changed files with 212 additions and 23 deletions

View File

@@ -73,8 +73,10 @@ type ServerConfig struct {
// AuthTimeout int `json:"auth_timeout"` // in seconds
AuditInterval int `json:"audit_interval"` // in seconds
ShowSQL bool `json:"show_sql"` // bool
IptablesNat bool `json:"iptables_nat"`
ShowSQL bool `json:"show_sql"` // bool
IptablesNat bool `json:"iptables_nat"`
Compression bool `json:"compression"` // bool
NoCompressLimit int `json:"no_compress_limit"` // int
}
func initServerCfg() {

View File

@@ -62,6 +62,8 @@ var configs = []config{
{Typ: cfgBool, Name: "show_sql", Usage: "显示sql语句用于调试", ValBool: false},
{Typ: cfgBool, Name: "iptables_nat", Usage: "是否自动添加NAT", ValBool: true},
{Typ: cfgBool, Name: "compression", Usage: "启用压缩", ValBool: false},
{Typ: cfgInt, Name: "no_compress_limit", Usage: "低于及等于多少字节不压缩", ValInt: 256},
}
var envs = map[string]string{}