Hello again, everyone. Today I want to tell you about what has changed in a new version of my rpmfile library (previous topic) for reading meta-information from RPM packages.Should I post this in the forum? I’m sorry.
Changes
- Fixed incorrect string parsing. I just forgot to make
advance
aftertake_till
(commit); angstrom-unix
is used by default to read files in theReader
module functions. Previously, a RPM package was read entirely into memory;- Optimized partial parsing of header sections. Reduced unnecessary memory allocations (commit);
- Decoding integers (int8/int16/int32/int64) to native int in access functions[1] (like
Rpmfile.payload_size
). You can also useget
to get “raw” values; - Improved compatibility with 4.0 version of RPM format by using native int;
- Added a module
Selector.Base
to select only basic package info (commit); - Some new access functions and output fields of the CLI utility.
rpmfile vs rpm -qi
Not a real “benchmark” for parsing 1.5 GB packages.
$ time rpm -qi repo/*.rpm
Executed in 226.82 millis fish external
usr time 212.74 millis 1.06 millis 211.68 millis
sys time 13.23 millis 0.00 millis 13.23 millis
$ time rpmfile repo/*.rpm
Executed in 153.97 millis fish external
usr time 116.74 millis 0.00 millis 116.74 millis
sys time 30.65 millis 1.47 millis 29.18 millis
Rpmfile doesn’t verify signatures, which is why it is “faster”.
What’s next?
This is enough for my tasks, so there probably won’t be a next release
To-Do: functionality to work with signatures, read payload, implement writer module for create packages.
Thank you for your attention!
P.S. I also want to apologize for my terrible English.
The access function gets and decodes values from a
metadata
record. ↩︎