Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • mkinitfs mkinitfs
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 16
    • Issues 16
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 14
    • Merge requests 14
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • alpine
  • mkinitfsmkinitfs
  • Issues
  • #20

Closed
Open
Created Dec 09, 2021 by Alex Xu (Hello71)@alxuContributor

Apply --size-hint when compressing to zstd

zstd allocates an excessive amount of memory when compressing small files from stdin at high compression presets. this can be avoided by using --size-hint. the size can be estimated by adding up the size of each file plus the size of the file names plus 106 for each file, but since all the files will most likely fit into RAM, the easiest way is to simply generate the cpio twice: once to get the size, and once to actually compress it.

Assignee
Assign to
Time tracking