1
0
mirror of https://github.com/fumiama/base16384.git synced 2026-06-07 19:40:23 +08:00
* fix typo

* fix: 32bit be decoding

* chore: add Rust alternative (#18)

* Update C# Link (#20)

* 尝试修复#19

- 移除未使用的参数 int blen
- 完善文档、注释
- 完善文件名错误检测
- 修复 encbuf, decbuf 处理逻辑

* fix: disable mmap in windows

* fix: encode bufsz (#19)

* v2.2.5

* Update Swift Link (#21)

---------

Co-authored-by: 忘忧北萱草 <wybxc@qq.com>
Co-authored-by: LC <64722907+lc6464@users.noreply.github.com>
Co-authored-by: oboard <oboard@outlook.com>
This commit is contained in:
源文雨
2024-03-26 01:52:27 +09:00
committed by GitHub
parent d2e6426c58
commit 65512e2dcd
8 changed files with 82 additions and 66 deletions

View File

@@ -1,6 +1,6 @@
/* base1464.c
* This file is part of the base16384 distribution (https://github.com/fumiama/base16384).
* Copyright (c) 2022 Fumiama Minamoto.
* Copyright (c) 2022-2023 Fumiama Minamoto.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -62,7 +62,7 @@
// #define DEBUG
int base16384_encode(const char* data, int dlen, char* buf, int blen) {
int base16384_encode(const char* data, int dlen, char* buf) {
int outlen = dlen / 7 * 8;
int offset = dlen % 7;
switch(offset) { // 算上偏移标志字符占用的2字节
@@ -136,7 +136,7 @@ int base16384_encode(const char* data, int dlen, char* buf, int blen) {
return outlen;
}
int base16384_decode(const char* data, int dlen, char* buf, int blen) {
int base16384_decode(const char* data, int dlen, char* buf) {
int outlen = dlen;
int offset = 0;
if(data[dlen-2] == '=') {