noopimpl

package
v0.62.3 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2025 License: Apache-2.0 Imports: 2 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package noopimpl provides a set of functions for compressing with zlib / zstd

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NoopStrategy

type NoopStrategy struct {
}

NoopStrategy is the strategy for when serializer_compressor_kind is neither zlib nor zstd

func (*NoopStrategy) Compress

func (s *NoopStrategy) Compress(src []byte) ([]byte, error)

Compress implements the Compress method for NoopStrategy to satisfy the Compressor interface

func (*NoopStrategy) CompressBound

func (s *NoopStrategy) CompressBound(sourceLen int) int

CompressBound implements the CompressBound method for NoopStrategy to satisfy the Compressor interface

func (*NoopStrategy) ContentEncoding

func (s *NoopStrategy) ContentEncoding() string

ContentEncoding implements the ContentEncoding method for NoopStrategy to satisfy the Compressor interface

func (*NoopStrategy) Decompress

func (s *NoopStrategy) Decompress(src []byte) ([]byte, error)

Decompress implements the Decompress method for NoopStrategy to satisfy the Compressor interface

func (*NoopStrategy) NewStreamCompressor

func (s *NoopStrategy) NewStreamCompressor(_ *bytes.Buffer) compression.StreamCompressor

NewStreamCompressor returns a nil when there is no compression implementation.

type Provides

type Provides struct {
	Comp compression.Component
}

Provides contains the compression component

func NewComponent

func NewComponent() Provides

NewComponent returns a new NoopStrategy for when kind is neither zlib nor zstd

Jump to

Keyboard shortcuts

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