diff --git a/Formats.md b/Formats.md index 07307ee..2367c08 100644 --- a/Formats.md +++ b/Formats.md @@ -2,7 +2,11 @@ The `slpkg` tool uses custom formats rather than zip/tar/gz and so on. -The reasoning behind this is very simple: zip and tar are complex formats with different extensions & cross-platform concerns, whereas the package manager just needs to do the basic job of packaging & installing software files (NOT modifying archives one file at a time, NOT backwards compatibility with old archives etc.). So it's much easier to implement formats for that purpose than using legacy zip or tar formats then having to add modern extensions as well as packaging metadata on top. +## Why New Formats? + +The reasoning behind this is very simple: zip and tar are complex formats with different extensions & cross-platform concerns, whereas the package manager just needs to do the basic job of packaging & installing software files (NOT modifying archives one file at a time, NOT backwards compatibility with old archives etc.). + +So it's much easier to implement formats for that purpose than using legacy zip or tar formats then having to add modern extensions as well as packaging metadata on top, but this also allows tight control over things like data integrity so hopefully the package manager also gives better feedback when things do break. ## .pkb files @@ -12,6 +16,8 @@ These are human-edited text files listing package contents and other metadata ne These are binary files consisting of an archive header, a number of (file-like or metadata) entry headers, a string section and then a series of file contents. +Each part of a `.pkg` file is checksummed individually, allowing archivers years down the track to monitor any bitrot in old packages in a fine-grained way. + ## .pkh files These are the same format as their corresponding `.pkg` except only need to contain the headers & strings to index installed data.