A dataEncoder encodes data for a particular QR Code version.
| 90 | |
| 91 | // A dataEncoder encodes data for a particular QR Code version. |
| 92 | type dataEncoder struct { |
| 93 | // Minimum & maximum versions supported. |
| 94 | minVersion int |
| 95 | maxVersion int |
| 96 | |
| 97 | // Mode indicator bit sequences. |
| 98 | numericModeIndicator *bitset.Bitset |
| 99 | alphanumericModeIndicator *bitset.Bitset |
| 100 | byteModeIndicator *bitset.Bitset |
| 101 | |
| 102 | // Character count lengths. |
| 103 | numNumericCharCountBits int |
| 104 | numAlphanumericCharCountBits int |
| 105 | numByteCharCountBits int |
| 106 | |
| 107 | // The raw input data. |
| 108 | data []byte |
| 109 | |
| 110 | // The data classified into unoptimised segments. |
| 111 | actual []segment |
| 112 | |
| 113 | // The data classified into optimised segments. |
| 114 | optimised []segment |
| 115 | } |
| 116 | |
| 117 | // newDataEncoder constructs a dataEncoder. |
| 118 | func newDataEncoder(t dataEncoderType) *dataEncoder { |
nothing calls this directly
no outgoing calls
no test coverage detected