# Struggling to use Mmap with ZipArchives

**URL:** https://discourse.julialang.org/t/struggling-to-use-mmap-with-ziparchives/129839
**Category:** General Usage
**Tags:** mmap, ziparchives
**Created:** [June 12, 2025, 3:08pm UTC](https://discourse.julialang.org/t/struggling-to-use-mmap-with-ziparchives/129839 "2025-06-12T15:08:15Z")
**Posts on this page:** 1
**Showing post:** 15

<div class="post-metadata">

### Author: ![nhz2](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nhz2/32/44428_2.png) [@nhz2](https://discourse.julialang.org/u/nhz2)
#### Post date: [June 15, 2025, 7:28pm UTC](https://discourse.julialang.org/t/struggling-to-use-mmap-with-ziparchives/129839/15 "2025-06-15T19:28:02Z")

</div>

I created a new thread to discuss adding this feature to the `Mmap` standard library:

> [@Method to unsafely close a mmap](https://discourse.julialang.org/t/method-to-unsafely-close-a-mmap/129900):
>
> Currently the Mmap.mmap function uses a [finalizer](https://github.com/JuliaLang/julia/blob/a23ce4bcbbb06be413169424cbffee0718b8a431/stdlib/Mmap/src/Mmap.jl#L256-L264) to handle calling munmap or UnmapViewOfFile when the array is garbage collected. It is useful to be able to do this finalization eagerly despite the potential risks if there are any unexpected references. Ref: Currently CSV.jl uses does the following as a workaround: Could a function that does this be added to the Mmap API as @topolarity suggested in [attach finalizer in `mmap` to the correct object by KristofferC · Pull Request #54210 · Ju…](https://github.com/JuliaLang/julia/pull/54210#issuecomment-2676877066)

---

_[View the full topic](https://discourse.julialang.org/t/struggling-to-use-mmap-with-ziparchives/129839)._
