https://github.com/ziglibs/uuencode
Unix-To-Unix-Encoding for Zig
https://github.com/ziglibs/uuencode
Last synced: 2 months ago
JSON representation
Unix-To-Unix-Encoding for Zig
- Host: GitHub
- URL: https://github.com/ziglibs/uuencode
- Owner: ziglibs
- License: mit
- Created: 2022-04-14T12:22:34.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2022-04-22T10:42:06.000Z (about 3 years ago)
- Last Synced: 2025-01-11T03:22:16.045Z (4 months ago)
- Language: Zig
- Size: 7.81 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
Awesome Lists containing this project
- awesome-zig - uuencode🗒️Unix-To-Unix-Encoding for Zig
README
# uuencode
A [uuencode](https://en.wikipedia.org/wiki/Uuencoding) implementation for Zig.
This is both a package as well as a command line utility.
## API
Include `src/uuencode.zig` as a package.
```zig
// encoders:
pub fn encodeFile(writer: anytype, file_name: []const u8, mode: ?std.fs.File.Mode, data: []const u8) !void;
pub fn encodeLine(writer: anytype, data: []const u8) !void;// decoders:
pub fn decodeLine(reader: anytype, buffer: *[45]u8) ![]u8;
pub fn decodeFile(reader: anytype) !Decoder; // not implemented yet// primitive functions:
pub fn encodeBlock(block: [3]u8) [4]u8;
pub fn decodeBlock(encoded: [4]u8) error{IllegalCharacter}![3]u8;
```## Tasks
- [ ] Create command line tooling
- [ ] Implement decodeFile