rpm-parser
RPM v3 package metadata parser in TypeScript for use in any environment.
Get Started
For Deno.
import { parseRpmMetadata } from "https://deno.land/x/rpm_parser/mod.ts";
High-level user API
// read from stream in chunks
const pkg = await parseRpmMetadata(blob.stream());
pkg.name; // string
pkg.buildTime; // Date
with direct access
pkg.raw.signature.entries.get(1004); // Entry
and configuration of optimization.
parseRpmMetadata(stream, {
// partial parsing of necessary header entries
select: {
tags: [
PackageInfoTag.Name,
PackageInfoTag.Os,
PackageInfoTag.Arch,
PackageInfoTag.Summery,
PackageInfoTag.Size,
],
},
});
Documentation
To-Do
Implementation
- lead
- header (signature and header)
- stream parser
- read payload (it's work but unknown how)
- sync parser
- user API