diff options
| author | 2025-12-23 09:34:19 -0500 | |
|---|---|---|
| committer | 2025-12-23 09:34:19 -0500 | |
| commit | 79b133e5d88fe6cfce337dd401fc09999db08852 (patch) | |
| tree | 8b3f9062edde82724c73147abf42143a885640fc /src/HangulData.zig | |
| parent | Merge branch 'develop-next' (diff) | |
| parent | Use takeDelimiterInclusive to support Zig 0.15.2 (diff) | |
| download | zg-79b133e5d88fe6cfce337dd401fc09999db08852.tar.gz zg-79b133e5d88fe6cfce337dd401fc09999db08852.tar.xz zg-79b133e5d88fe6cfce337dd401fc09999db08852.zip | |
Merge branch 'fifteen-two'
Close #90
Close #87
Close #83
Thanks everyone.
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; |