Commit graph

19 commits

Author SHA1 Message Date
e18d4cea82
io/fs: do not replace files with unchanged contents
Do not update file timestamps when contents have not actually changed.
2023-07-30 20:31:40 +02:00
587db0464c
io/storage: use fs::create_with_tmpfile() helper 2023-06-01 23:10:47 +02:00
1abb260997
io/fs: add new module with filesystem access helpers
Wrappers around std::fs with error messages, as well as a
create_with_tmpfile() helper.
2023-06-01 22:59:19 +02:00
a4b726992a
io/storage: compress/decompress data in bulk
The bulk API is signifiantly faster than the stream API.
2023-03-03 20:58:35 +01:00
657d8af8a7
io/storage: add read() function 2023-03-03 19:20:56 +01:00
21fd3a42ca
io: add storage helper
Use bincode+zstd to serialize data structures for temporary storage.
2023-02-28 21:59:45 +01:00
b2d849081d
io/region: allow stopping foreach_chunk early
Errors returned from the callback stop the loop early.
2023-02-26 01:01:37 +01:00
8c34f74952
io/region: return sorted Vec instead of HashMap from parse_header()
Instead of counting and looking up indices in the HashMap, we can just
iterate over all offsets in the returned Vec.
2023-01-30 19:08:51 +01:00
6186a0d916
io/region: accept incomplete block for final chunk 2023-01-30 00:45:05 +01:00
92a9bb3bb3
io/region: add chunk coords to error descriptions 2023-01-29 17:08:39 +01:00
1d126ba771
io/region: remove error handling for impossible cases from decode_chunk() 2023-01-29 17:04:28 +01:00
7c7e36f6be
io/region: avoid panic for invalid chunk lengths 2023-01-29 00:54:18 +01:00
da8ac506d9
io: remove a few unnecessary [..] for Vec -> slice deref 2023-01-28 01:15:00 +01:00
3cdafa7be9
Fix clippy warnings 2023-01-27 23:01:01 +01:00
daa188eb1d
io/region: use ChunkArray to parse region header
A layout of a ChunkArray::<u32> matches the binary format of the region
header.
2023-01-27 22:54:08 +01:00
28b22ce423
Introduce ChunkArray type
A generic array for per-chunk data, indexed by ChunkCoords.
2023-01-27 22:05:49 +01:00
48e03aa266
Introduce ChunkCoords type 2023-01-27 22:01:41 +01:00
0d8b989c10
io/region: remove count variable from Region::foreach_chunk() 2023-01-25 21:47:17 +01:00
5e96be3fda
Refactor logic from new dump tools into library crate 2023-01-25 21:42:16 +01:00