kdomanski / iso9660

A go library for reading and creating ISO9660 images
BSD 2-Clause "Simplified" License
265 stars 43 forks source link

In memory image creation #18

Closed aminya closed 1 year ago

aminya commented 2 years ago

Currently, the package creates a temporary folder and copies the files into it to create the image. This can be avoided by using an in-memory creation.

kdomanski commented 2 years ago

Hi. Using a staging directory is intentional, in order to avoid a large memory footprint in case of building a larger image. You can still do it in memory by using a memory-backed filesystem (e.g. tmpfs) for your staging directory. Note that when possible (i.e. when the staging directory is on the same mount as the source files) the library creates a hardlink instead of copying a file.