mdfreader
mdfreader copied to clipboard
write only file_meta to existing mdf file
How can I write only updated file_metadata dict from read file to same existing file without having to read in any other data?
This is more a feature request somehow...
I am not sure to understand exactly but I guess you want a specific method to write only metadata in file ? Currently, if you give the filename as argument in write method, it will overwrite the complete file with the mdf object/metadata/data in memory (size might inflate) For mdf 3.x, this should be relatively easy, metadata being in header block. However, more complicated for mdf4.x as there are metatadata in all kind of blocks with variable lengthes, easier to rewrite the file.
actually I just want to (over) write one metadata item e.g a hash key into the existing mdf file, no matter if i have to rewrite it or not.
we have made a function to do that for mdf 3.x, only for mdf 4.x upwards compatibility it would be nice to implement this inside mdfreader. For now there is no urgent need for that. Thanks for your fast reply!
Sort of on a related note: when converting and mdf4 to mdf3 file (or vise versa) - is it possible to retain the meta data (e.g., comments, project info, start/stop time, etc...) in the new output file?
Thanks!