feat: модуль upload — вынос слоёв 1 и 2 (выбор файлов + закачка через ВМ), файл-на-функцию, тесты

This commit is contained in:
“Naeel”
2026-08-25 08:08:14 +03:00
parent 5f5ed000b8
commit 5711e97fe5
42 changed files with 1671 additions and 0 deletions
+8
View File
@@ -0,0 +1,8 @@
// inflateRaw — распаковка deflate-raw (метод 8) через нативный DecompressionStream.
export async function inflateRaw(bytes) {
const ds = new DecompressionStream('deflate-raw');
const stream = new Blob([bytes]).stream().pipeThrough(ds);
const ab = await new Response(stream).arrayBuffer();
return new Uint8Array(ab);
}