compress

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 15, 2024 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Overview

Package compress は、 トランスポートメッセージの圧縮に関するパッケージです。

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// Enableは圧縮の有効化です。
	//
	// Enableが `false` の場合、その他すべての圧縮設定が無視されます。
	Enable bool

	// Level は、 DEFLATE 圧縮の圧縮レベルです。
	// 詳細な設定値については、 compress/zlib パッケージの定数を参照してください。
	Level int

	// DisableContextTakeover は、 DEFLATE 圧縮のコンテキスト引き継ぎ(Context Takeover)の有効無効を設定します。
	DisableContextTakeover bool

	// WindowBits は、DEFLATE 圧縮のコンテキスト引き継ぎ(Context Takeover)におけるウィンドウサイズを表すビット数です。
	WindowBits int
}

Config は、 トランスポート層での圧縮に関する設定です。

func (Config) Type

func (c Config) Type() Type

func (Config) WindowSize

func (c Config) WindowSize() int

WindowSize は、DEFLATE 圧縮のコンテキスト引き継ぎ(Context Takeover)におけるウィンドウサイズを返します。 ( WindowSize = 2 ^ WindowBits )

type Type

type Type string

Type は、圧縮の形式を表します。

const (
	// TypePerMessage は、メッセージごとに圧縮することを表します。
	TypePerMessage Type = "per-message"

	// TypeContextTakeOver は、DEFLATE 圧縮のコンテキスト引き継ぎ(Context Takeover)で圧縮することを表します。
	TypeContextTakeOver Type = "context-takeover"
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL