Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

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