DSRC icon indicating copy to clipboard operation
DSRC copied to clipboard

binary and C++ API not compatible

Open jvolkening opened this issue 10 years ago • 4 comments

Compiling example 3.4.3 from the manual succeeds (after fixing argv_ indices on lines 12 and 13) and the resulting binary compresses a test file. The binary produced by compiling example 3.4.4 can decompress this file to produce output identical to the original. However, decompressing using the main 'dsrc' binary produces corrupted output with null bytes scattered throughout.

I am using a 64-bit Linux OS. I compiled the test programs using gcc 4.9.2 with the same flags used in the Makefile for the main binary. Is this a platform-specific bug or can anyone else reproduce it?

jvolkening avatar Sep 03 '15 07:09 jvolkening

Thanks for report! Now the C++ library API is getting slightly changed, extending the available functionality. The problem you are mentioning should not occur even in the current version - I'll take a closer look into that.

lrog avatar Oct 07 '15 13:10 lrog

There was a bug in the DSRC library when compressing FASTQ data record-by-record. The size of internal FASTQ block buffer was saved one byte too large, resulting in adding extra invalid information to the output FASTQ file when decompressing.

It has been fixed in 3d8de3f52efb653347c68d86d65ddcfc7cfb08f1 in the devel branch.

In 3d8de3f52efb653347c68d86d65ddcfc7cfb08f1 also simple unit tests have been added in test/test_dsrc_cpplib.py to perform the compatibility check between generated archives and decompressed FASTQ files.

Could you please check whether the bug still occurs in your case?

lrog avatar Oct 07 '15 17:10 lrog

Thanks, works well now.

jvolkening avatar Oct 08 '15 02:10 jvolkening

Great, thanks. I'll close the issue once the changes from devel branch are integrated into the master.

lrog avatar Oct 08 '15 09:10 lrog