
Product
Rust Support Now in Beta
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.
keynote-archives
Advanced tools
Utilities to process Keynote presentations (*.key).
Protobuf files were taken from psobot / keynote-parser. Read more about the iWorkArchive format here. Generated by Keynote version 12.2.1 (current as of December 2022).
npm install keynote-archives
Then import the package and unzip the inner files, dechunk the single IWA files and split each chunk into objects.
import { unzip, isIwaFile, dechunk, uncompress, splitObjectsAs, KeynoteArchives } from 'keynote-archives';
export async function decode(data: Uint8Array): void {
for await(const entry of unzip(data)) {
if(isIwaFile(entry.name)) {
for await(const snappyChunk of dechunk(entry.data)) {
const chunk = await uncompress(snappyChunk.data);
for await(const message of splitObjectsAs(chunk, KeynoteArchives)) {
...
}
}
}
}
}
This package provides asynchronous functions to read IWA format. Here is a small overview about the terminology:
Here is what they do in detail:
unzip
: opens an Uint8Array
as Zip file and returns multiple file entries, until EOF
.dechunk
: opens an Uint8Array
as IWA file and returns multiple Snappy-compressed chunks as Uint8Array
, until EOF
.uncompress
: opens an Uint8Array
as Snappy chunk and returns uncompressed data as Uint8Array
.splitObjectsAs
: opens an Uint8 array as IWA file chunk and returns multiple Protobuf-decoded IWA (JSON) objects, until EOF
or error.decode
: (everything at once) opens an Uint8 array as Zip file and returns multiple ArchiveEntry
s containing either a file or a list of IWA chunks with multiple IWA objects associated with an IWA file.analyzeChunkFor
: analyzes an Uint8Array
IWA chunk for ArchiveInfo
segments and returns archive infos and gaps for further analysis.You will also get access to all archives types:
AllArchives
is a list of all archives.XXX
, you will get:
XXX$Archives
XXX
with all archives XXX.yyy
KeynoteArchives
npm install //Initialize NPM package...
npm run clean //Clean artifacts from last build
npm run generate-ts-from-proto //Generate Typescript files from Protobuf files...
npm run generate-index-from-ts //Create the index...
npm run build //Transpile to Javascript...
FAQs
Contains Keynote Archive serializers and deserializers
We found that keynote-archives demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.
Product
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.