mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-22 21:32:31 +00:00
Add filesystem index to ZipOS
This change brings the /zip/... read-only filesystem into performance parity with the native Linux filesystem which doesn't use compression therefore, imagine how much faster this could be with bloom filtering rather than simple binary search, and if we used zstd instead of zlib
This commit is contained in:
parent
7100b1cf91
commit
5b42c810a5
7 changed files with 93 additions and 25 deletions
|
@ -382,7 +382,7 @@ static struct dirent *readdir_zipos(DIR *dir) {
|
|||
while (p.len && p.path[p.len - 1] == '/') --p.len;
|
||||
p.path[p.len] = 0;
|
||||
ent->d_ino = __zipos_inode(
|
||||
dir->zip.zipos, __zipos_find(dir->zip.zipos, &p), p.path, p.len);
|
||||
dir->zip.zipos, __zipos_scan(dir->zip.zipos, &p), p.path, p.len);
|
||||
} else {
|
||||
uint8_t *s = ZIP_CFILE_NAME(dir->zip.zipos->map + dir->zip.offset);
|
||||
size_t n = ZIP_CFILE_NAMESIZE(dir->zip.zipos->map + dir->zip.offset);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue