mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 03:29:51 +02:00
fix: identity encoding
This commit is contained in:
1 parent
084d55b853
commit
5e9555aa57
16 files changed
+90
-93
No files matched your search
@@ -134,14 +134,12 @@ function post() {
|
||||
const files = idsChunked.map((chunk, index) => {
|
||||
const didsWriteStream = new DidsWriteStream().dids(chunk);
|
||||
const buffer = didsWriteStream.uint8Array;
|
||||
const compressed = compress(buffer);
|
||||
const content = compress(buffer);
|
||||
|
||||
console.log(
|
||||
`Chunk ${index} with ${chunk.length} ids (compressed: ${compressed.length}; uncompressed: ${buffer.length})`,
|
||||
`Chunk ${index} with ${chunk.length} ids (compressed: ${content.length}; uncompressed: ${buffer.length})`,
|
||||
);
|
||||
|
||||
const content = Buffer.from(compressed);
|
||||
|
||||
return {
|
||||
content,
|
||||
path: `ids/${index}.dids.lz4`,
|
||||
@@ -151,13 +149,12 @@ function post() {
|
||||
commitAssets('discovered ids', [
|
||||
...files,
|
||||
{
|
||||
content: Buffer.from(
|
||||
content: new TextEncoder().encode(
|
||||
JSON.stringify({
|
||||
chunks: idsChunked.length,
|
||||
count: ids.length,
|
||||
time: Date.now(),
|
||||
} satisfies DiscoveredIdsDefinitions),
|
||||
'utf-8',
|
||||
),
|
||||
path: 'ids/manifest.json',
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user