forked from cozmo/jsQR
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request cozmo#43 from cozmo/nuke-all-windows-line-endings
Nuke all windows line endings
- Loading branch information
Showing
21 changed files
with
21,115 additions
and
21,114 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
import { BitMatrix } from "../BitMatrix"; | ||
export declare function binarize(data: Uint8ClampedArray, width: number, height: number): BitMatrix; | ||
import { BitMatrix } from "../BitMatrix"; | ||
export declare function binarize(data: Uint8ClampedArray, width: number, height: number): BitMatrix; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
export declare class BitMatrix { | ||
static createEmpty(width: number, height: number): BitMatrix; | ||
width: number; | ||
height: number; | ||
private data; | ||
constructor(data: Uint8ClampedArray, width: number); | ||
get(x: number, y: number): boolean; | ||
set(x: number, y: number, v: boolean): void; | ||
setRegion(left: number, top: number, width: number, height: number, v: boolean): void; | ||
} | ||
export declare class BitMatrix { | ||
static createEmpty(width: number, height: number): BitMatrix; | ||
width: number; | ||
height: number; | ||
private data; | ||
constructor(data: Uint8ClampedArray, width: number); | ||
get(x: number, y: number): boolean; | ||
set(x: number, y: number, v: boolean): void; | ||
setRegion(left: number, top: number, width: number, height: number, v: boolean): void; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
export declare class BitStream { | ||
private bytes; | ||
private byteOffset; | ||
private bitOffset; | ||
constructor(bytes: Uint32Array); | ||
readBits(numBits: number): number; | ||
available(): number; | ||
} | ||
export declare class BitStream { | ||
private bytes; | ||
private byteOffset; | ||
private bitOffset; | ||
constructor(bytes: Uint32Array); | ||
readBits(numBits: number): number; | ||
available(): number; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
export declare class BitStream { | ||
private bytes; | ||
private byteOffset; | ||
private bitOffset; | ||
constructor(bytes: Uint8ClampedArray); | ||
readBits(numBits: number): number; | ||
available(): number; | ||
} | ||
export declare class BitStream { | ||
private bytes; | ||
private byteOffset; | ||
private bitOffset; | ||
constructor(bytes: Uint8ClampedArray); | ||
readBits(numBits: number): number; | ||
available(): number; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,21 @@ | ||
export interface Chunk { | ||
type: Mode; | ||
text: string; | ||
} | ||
export interface ByteChunk { | ||
type: Mode.Byte | Mode.Kanji; | ||
bytes: number[]; | ||
} | ||
export declare type Chunks = Array<Chunk | ByteChunk>; | ||
export interface DecodedQR { | ||
text: string; | ||
bytes: number[]; | ||
chunks: Chunks; | ||
} | ||
export declare enum Mode { | ||
Numeric = "numeric", | ||
Alphanumeric = "alphanumeric", | ||
Byte = "byte", | ||
Kanji = "kanji", | ||
} | ||
export declare function decode(data: Uint8ClampedArray, version: number): DecodedQR; | ||
export interface Chunk { | ||
type: Mode; | ||
text: string; | ||
} | ||
export interface ByteChunk { | ||
type: Mode.Byte | Mode.Kanji; | ||
bytes: number[]; | ||
} | ||
export declare type Chunks = Array<Chunk | ByteChunk>; | ||
export interface DecodedQR { | ||
text: string; | ||
bytes: number[]; | ||
chunks: Chunks; | ||
} | ||
export declare enum Mode { | ||
Numeric = "numeric", | ||
Alphanumeric = "alphanumeric", | ||
Byte = "byte", | ||
Kanji = "kanji", | ||
} | ||
export declare function decode(data: Uint8ClampedArray, version: number): DecodedQR; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
export declare const shiftJISTable: { | ||
[key: number]: number; | ||
}; | ||
export declare const shiftJISTable: { | ||
[key: number]: number; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
export declare function decodeQRdata(data: Uint8ClampedArray, version: number, ecl: string): number[]; | ||
export declare function decodeQRdata(data: Uint8ClampedArray, version: number, ecl: string): number[]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import { BitMatrix } from "../BitMatrix"; | ||
import { DecodedQR } from "./decodeData"; | ||
export declare function decode(matrix: BitMatrix): DecodedQR; | ||
import { BitMatrix } from "../BitMatrix"; | ||
import { DecodedQR } from "./decodeData"; | ||
export declare function decode(matrix: BitMatrix): DecodedQR; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
import GenericGFPoly from "./GenericGFPoly"; | ||
export declare function addOrSubtractGF(a: number, b: number): number; | ||
export default class GenericGF { | ||
primitive: number; | ||
size: number; | ||
generatorBase: number; | ||
zero: GenericGFPoly; | ||
one: GenericGFPoly; | ||
private expTable; | ||
private logTable; | ||
constructor(primitive: number, size: number, genBase: number); | ||
multiply(a: number, b: number): number; | ||
inverse(a: number): number; | ||
buildMonomial(degree: number, coefficient: number): GenericGFPoly; | ||
log(a: number): number; | ||
exp(a: number): number; | ||
} | ||
import GenericGFPoly from "./GenericGFPoly"; | ||
export declare function addOrSubtractGF(a: number, b: number): number; | ||
export default class GenericGF { | ||
primitive: number; | ||
size: number; | ||
generatorBase: number; | ||
zero: GenericGFPoly; | ||
one: GenericGFPoly; | ||
private expTable; | ||
private logTable; | ||
constructor(primitive: number, size: number, genBase: number); | ||
multiply(a: number, b: number): number; | ||
inverse(a: number): number; | ||
buildMonomial(degree: number, coefficient: number): GenericGFPoly; | ||
log(a: number): number; | ||
exp(a: number): number; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
import GenericGF from "./GenericGF"; | ||
export default class GenericGFPoly { | ||
private field; | ||
private coefficients; | ||
constructor(field: GenericGF, coefficients: Uint8ClampedArray); | ||
degree(): number; | ||
isZero(): boolean; | ||
getCoefficient(degree: number): number; | ||
addOrSubtract(other: GenericGFPoly): GenericGFPoly; | ||
multiply(scalar: number): GenericGFPoly; | ||
multiplyPoly(other: GenericGFPoly): GenericGFPoly; | ||
multiplyByMonomial(degree: number, coefficient: number): GenericGFPoly; | ||
evaluateAt(a: number): number; | ||
} | ||
import GenericGF from "./GenericGF"; | ||
export default class GenericGFPoly { | ||
private field; | ||
private coefficients; | ||
constructor(field: GenericGF, coefficients: Uint8ClampedArray); | ||
degree(): number; | ||
isZero(): boolean; | ||
getCoefficient(degree: number): number; | ||
addOrSubtract(other: GenericGFPoly): GenericGFPoly; | ||
multiply(scalar: number): GenericGFPoly; | ||
multiplyPoly(other: GenericGFPoly): GenericGFPoly; | ||
multiplyByMonomial(degree: number, coefficient: number): GenericGFPoly; | ||
evaluateAt(a: number): number; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
export declare function decode(bytes: number[], twoS: number): Uint8ClampedArray; | ||
export declare function decode(bytes: number[], twoS: number): Uint8ClampedArray; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
export interface Version { | ||
infoBits: number; | ||
versionNumber: number; | ||
alignmentPatternCenters: number[]; | ||
errorCorrectionLevels: Array<{ | ||
ecCodewordsPerBlock: number; | ||
ecBlocks: Array<{ | ||
numBlocks: number; | ||
dataCodewordsPerBlock: number; | ||
}>; | ||
}>; | ||
} | ||
export declare const VERSIONS: Version[]; | ||
export interface Version { | ||
infoBits: number; | ||
versionNumber: number; | ||
alignmentPatternCenters: number[]; | ||
errorCorrectionLevels: Array<{ | ||
ecCodewordsPerBlock: number; | ||
ecBlocks: Array<{ | ||
numBlocks: number; | ||
dataCodewordsPerBlock: number; | ||
}>; | ||
}>; | ||
} | ||
export declare const VERSIONS: Version[]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
import { BitMatrix } from "../BitMatrix"; | ||
import { QRLocation } from "../locator"; | ||
export declare function extract(image: BitMatrix, location: QRLocation): { | ||
matrix: BitMatrix; | ||
mappingFunction: (x: number, y: number) => { | ||
x: number; | ||
y: number; | ||
}; | ||
}; | ||
import { BitMatrix } from "../BitMatrix"; | ||
import { QRLocation } from "../locator"; | ||
export declare function extract(image: BitMatrix, location: QRLocation): { | ||
matrix: BitMatrix; | ||
mappingFunction: (x: number, y: number) => { | ||
x: number; | ||
y: number; | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
import { Chunks } from "./decoder/decodeData"; | ||
import { Point } from "./locator"; | ||
export interface QRCode { | ||
binaryData: number[]; | ||
data: string; | ||
chunks: Chunks; | ||
location: { | ||
topRightCorner: Point; | ||
topLeftCorner: Point; | ||
bottomRightCorner: Point; | ||
bottomLeftCorner: Point; | ||
topRightFinderPattern: Point; | ||
topLeftFinderPattern: Point; | ||
bottomLeftFinderPattern: Point; | ||
bottomRightAlignmentPattern?: Point; | ||
}; | ||
} | ||
export default function x(data: Uint8ClampedArray, width: number, height: number): QRCode | null; | ||
import { Chunks } from "./decoder/decodeData"; | ||
import { Point } from "./locator"; | ||
export interface QRCode { | ||
binaryData: number[]; | ||
data: string; | ||
chunks: Chunks; | ||
location: { | ||
topRightCorner: Point; | ||
topLeftCorner: Point; | ||
bottomRightCorner: Point; | ||
bottomLeftCorner: Point; | ||
topRightFinderPattern: Point; | ||
topLeftFinderPattern: Point; | ||
bottomLeftFinderPattern: Point; | ||
bottomRightAlignmentPattern?: Point; | ||
}; | ||
} | ||
export default function x(data: Uint8ClampedArray, width: number, height: number): QRCode | null; |
Oops, something went wrong.