Skip to content

Commit

Permalink
Merge pull request #8 from noir-lang/zw/8bit
Browse files Browse the repository at this point in the history
decoder now works for byte values that are 8 bits, not just 7 bits
  • Loading branch information
zac-williamson authored Sep 11, 2024
2 parents 9f4eb44 + fe3628a commit e7a6a9e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/lib.nr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
struct Base64EncodeBE {
table: [u8; 128]
table: [u8; 256]
}
impl Base64EncodeBE {
fn new() -> Self {
Expand All @@ -20,7 +20,11 @@ impl Base64EncodeBE {
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,// 65-90 (A-Z)
0, 0, 0, 0, 0, 0,// 91-96
26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51,// 97-122 (a-z)
0, 0, 0, 0, 0// 123-127
0, 0, 0, 0, 0,// 123-127
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
]
}
}
Expand Down

0 comments on commit e7a6a9e

Please sign in to comment.