MCPcopy Create free account
hub / github.com/divan/txqr / NewEncoder

Function NewEncoder

encode.go:17–22  ·  view source on GitHub ↗

NewEncoder creates and inits a new encoder for the given chunk length.

(n int)

Source from the content-addressed store, hash-verified

15
16// NewEncoder creates and inits a new encoder for the given chunk length.
17func NewEncoder(n int) *Encoder {
18 return &Encoder{
19 chunkLen: n,
20 redundancyFactor: 2.0,
21 }
22}
23
24// Encode encodes data from reader and splits it into chunks to be
25// futher converted to QR code frames.

Callers 8

AnimatedGifFunction · 0.92
mainFunction · 0.92
AnimatedGifFunction · 0.92
TestTXQRFunction · 0.85
TestTXQRErasuresFunction · 0.85
BenchmarkTXQREncodeFunction · 0.85
BenchmarkTXQRDecodeFunction · 0.85
BenchmarkTXQRErasuresFunction · 0.85

Calls

no outgoing calls

Tested by 5

TestTXQRFunction · 0.68
TestTXQRErasuresFunction · 0.68
BenchmarkTXQREncodeFunction · 0.68
BenchmarkTXQRDecodeFunction · 0.68
BenchmarkTXQRErasuresFunction · 0.68