Skip to content

Rewrote ennaf/unnaf Tool in Rust to test nafcodec library functionality#1

Open
j-schlesinger wants to merge 4 commits intoalthonos:mainfrom
j-schlesinger:ffi_library
Open

Rewrote ennaf/unnaf Tool in Rust to test nafcodec library functionality#1
j-schlesinger wants to merge 4 commits intoalthonos:mainfrom
j-schlesinger:ffi_library

Conversation

@j-schlesinger
Copy link

Description of Changes

A ennaf/unnaf tool in Rust to compare nafcodec directly to existing C implementation.

Summary of Changes

Changes to Nafcodec

The following changes were made to the Nafcodec library

  • Changed Seq storage type from str to [u8] (more accurately represents data)
  • added Size struct (for block sizes)
  • added ability to extract block sizes and title from NAF file
  • added ability to write mask and title to NAF file

CLI tool

The tool is quick and dirty, but it gets the job done.

  • module implementing nafcodec encoding
  • module implementing nafcodec decoding
  • main function that handles CLI arguments and I/O

Testing

Compressed the same protein sequence with ennaf and naf_rs ennaf. Then compared that results were identical. Decompressed a file compressed by ennaf using naf_rs unnaf and compared it to the output of unnaf. The results were identical.

@althonos althonos force-pushed the main branch 2 times, most recently from 55c6c37 to 0d991ce Compare January 31, 2025 13:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant