-
Notifications
You must be signed in to change notification settings - Fork 10
Conversation
src/meta.rs
Outdated
let mut metadata_file = File::create( | ||
metadata_path | ||
.to_owned() | ||
.join(format!("{}", resource_id.crc32)), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whole resource_id
must be used in the filename here.
E.g. 123-45678
where 123 is size of the data, and 45678 is CRC-32 checksum.
src/meta.rs
Outdated
name, | ||
extension, | ||
kind, | ||
extra, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, we only need to store extra
part. We can put created_data
into extra
structure. It's not needed to store id
(because it is stored in the filename), name
and extension
(because it's derived from path which is stored in index). I'm not sure about kind
, if we can avoid storing it, that would be good. We should store only strictly necessary data.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think maybe we should keep the id field as it's needed to pass the index tests!
fe6047c
to
1d7eb4c
Compare
Refactored metadata loading and purified |
Description
#24
#27
ARK-Builders/arklib-android#22
ARK-Builders/ARK-Memo#8