MCPcopy Create free account
hub / github.com/boombuler/barcode / DataCodewordsForBlock

Method DataCodewordsForBlock

datamatrix/codesize.go:32–42  ·  view source on GitHub ↗
(idx int)

Source from the content-addressed store, hash-verified

30}
31
32func (s *dmCodeSize) DataCodewordsForBlock(idx int) int {
33 if s.Rows == 144 && s.Columns == 144 {
34 // Special Case...
35 if idx < 8 {
36 return 156
37 } else {
38 return 155
39 }
40 }
41 return s.DataCodewords() / s.BlockCount
42}
43
44func (s *dmCodeSize) ErrorCorrectionCodewordsPerBlock() int {
45 return s.ECCCount / s.BlockCount

Callers 1

calcECCMethod · 0.80

Calls 1

DataCodewordsMethod · 0.95

Tested by

no test coverage detected