diff options
| author | 2025-09-13 08:38:24 -0700 | |
|---|---|---|
| committer | 2025-09-14 01:48:41 -0700 | |
| commit | a3b5e884b12fdaa341010ef41bb9382fa0cd89f8 (patch) | |
| tree | 8bdd22c1c54da0b56ef6b9fe0dc4c2ca667b71a3 /src/HangulData.zig | |
| parent | Update build to 0.15.0 (diff) | |
| download | zg-a3b5e884b12fdaa341010ef41bb9382fa0cd89f8.tar.gz zg-a3b5e884b12fdaa341010ef41bb9382fa0cd89f8.tar.xz zg-a3b5e884b12fdaa341010ef41bb9382fa0cd89f8.zip | |
Update codebase to Zig 0.15.1.
Removes compression support
Diffstat (limited to 'src/HangulData.zig')
| -rw-r--r-- | src/HangulData.zig | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/HangulData.zig b/src/HangulData.zig index 8c5f3ad..cae8b97 100644 --- a/src/HangulData.zig +++ b/src/HangulData.zig | |||
| @@ -15,11 +15,9 @@ s2: []u3 = undefined, | |||
| 15 | const Hangul = @This(); | 15 | const Hangul = @This(); |
| 16 | 16 | ||
| 17 | pub fn init(allocator: mem.Allocator) !Hangul { | 17 | pub fn init(allocator: mem.Allocator) !Hangul { |
| 18 | const decompressor = compress.flate.inflate.decompressor; | ||
| 19 | const in_bytes = @embedFile("hangul"); | 18 | const in_bytes = @embedFile("hangul"); |
| 20 | var in_fbs = std.io.fixedBufferStream(in_bytes); | 19 | var in_fbs = std.io.fixedBufferStream(in_bytes); |
| 21 | var in_decomp = decompressor(.raw, in_fbs.reader()); | 20 | var reader = in_fbs.reader(); |
| 22 | var reader = in_decomp.reader(); | ||
| 23 | 21 | ||
| 24 | const endian = builtin.cpu.arch.endian(); | 22 | const endian = builtin.cpu.arch.endian(); |
| 25 | var hangul = Hangul{}; | 23 | var hangul = Hangul{}; |
| @@ -49,6 +47,5 @@ pub fn syllable(hangul: *const Hangul, cp: u21) Syllable { | |||
| 49 | 47 | ||
| 50 | const std = @import("std"); | 48 | const std = @import("std"); |
| 51 | const builtin = @import("builtin"); | 49 | const builtin = @import("builtin"); |
| 52 | const compress = std.compress; | ||
| 53 | const mem = std.mem; | 50 | const mem = std.mem; |
| 54 | const testing = std.testing; | 51 | const testing = std.testing; |