Closed Razican closed 4 years ago
Awesome! I'll take a look ASAP. Your list of improvents looks like a TODO list to me :)
I'll also take a look to the missing files.
The files are no longer missing. But there is a conflict now with src/xisfreader.rs
The conflict was due to "geometry" parsing being done in a different function. For now, I have just rebased the code, which should pass the tests. I will be reviewing how to simplify the code next.
I added some more optimizations. Most relevant is the inclusion of the XISFile
structure, that contains the data, header and keywords in the same place, and the substitution of the type strings by an enumeration (#6).
I do have one question, though. When reading the geometry, it's prepared to read something like xxx:yyy:zzz
. Is there a case where something like this could exist? uuu:vvv:xxx:yyy:zzz
?
FITS, and thus XISF, is dynamic, so it can store basically anything.
Specifically, XISF
This uses
quick_xml
for a much faster reading of the XML header. There is still room for improvement, and that's why I'm placing this as a draft PR.This also changes the following:
XISFile
structure that contains the header, the data and the keywords of a XISF file together in one structure.String::from("")
,String::new()
is more clearlazy_static
dependencyreadme
,repository
andlicense
metadata attributes inCargo.toml
, so that it can be published in crates.ioBox<[T]>
andBox<str>
instead ofVec<T>
orString
respectively, for better memory usage. (not 100% finished)Improvements to be done:
unwrap()
panics, and use a proper error handling with eitheranyhow
orquick-error
XISFData
should be a generic structure on its type of content, in order not to have duplicated (and empty) lists.byteorder
crate.Note that there seems to be an ignored test with LZ4 compression.