length

package
v2.0.3-0...-26c9a2f Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2023 License: Apache-2.0 Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(baseCodec codec.Codec) codec.Codec

New returns a default IntLengthFieldBased codec

func NewWithSize

func NewWithSize(baseCodec codec.Codec, lengthFieldOffset, lengthAdjustment, initialBytesToStrip, maxBodySize int) codec.Codec

NewWithSize create IntLengthFieldBased codec initialBytesToStrip + lengthFieldOffset + 4(length) lengthAdjustment, some case as below: 1. 0 : base decoder received: body 2. -4: base decoder received: 4(length) + body 3. -(4 + lengthFieldOffset): base decoder received: lengthFieldOffset + 4(length) + body 4. -(4 + lengthFieldOffset + initialBytesToStrip): base decoder received: initialBytesToStrip + lengthFieldOffset + 4(length)

Types

This section is empty.

Jump to

Keyboard shortcuts

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