@zxing/library
Version:
TypeScript port of ZXing multi-format 1D/2D barcode image processing library.
10 lines (9 loc) • 402 B
JavaScript
import SimpleToken from './SimpleToken';
import BinaryShiftToken from './BinaryShiftToken';
export function addBinaryShift(token, start, byteCount) {
// int bitCount = (byteCount * 8) + (byteCount <= 31 ? 10 : byteCount <= 62 ? 20 : 21);
return new BinaryShiftToken(token, start, byteCount);
}
export function add(token, value, bitCount) {
return new SimpleToken(token, value, bitCount);
}