ihedvall / mdflib

Implementation of the ASAM MDF data file.
https://ihedvall.github.io/mdflib/
MIT License
57 stars 25 forks source link

Potential bug, compression error? #76

Closed jezzzzza closed 2 months ago

jezzzzza commented 3 months ago

Im doing this

image

with compression set to true earlier in the code

image

Vector MDF validator gives me this errors

image

im using this commit from mdflib --> 9c7a6fedc4d742fbb4e2ddcbf975ee0ee46b4226

ihedvall commented 3 months ago

Thanks for finding bugs.

I'm repainting my working room why my main computer is disconnected. It may take some days before I can check the error. I suspect that the data to store is less than 100 byte which is the lower limit for compressing. You can copy the TestWrite::CompressData unit test so it shows your error. In TestWrite::*, all files are saved in the "%TEMP%/test/mdf/write" directory until next run so you may.

Note: I found some other errors with some flags which should also be corrected.

ihedvall commented 3 months ago

@jezzzzza I have modified the CompressData unit test but it seems to be working OK. I'm using the latest release. It suspect it may be some error with the channel definition (array/string?) and compress. Can you give me little bit information about the how you configured the channel and channel group?

ihedvall commented 3 months ago

I think I have found the error. I suspect I need to add a HL block to the compressed SD block. Need to check the specification. I return in a day or so.

ihedvall commented 3 months ago

@jezzzzza I have corrected the missing HL block when using compression. This will hopefully solve the bug but I would be thankful if you have the possibility to test it on your code.