Add binary Bible format (.beblia) support with converter tool#2
Merged
Add binary Bible format (.beblia) support with converter tool#2
Conversation
- Added SaveBinary methods to Bible class for binary serialization - Updated BibleParser.Load to auto-detect XML vs binary format - Created Beblia.Converter console tool to convert XML to binary - Binary format is ~17% smaller than XML - Updated ConsoleSample to demonstrate both formats - Added comprehensive README documentation Co-authored-by: russkyc <32549126+russkyc@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Update Beblia.Sharp to support XML and binary formats
Add binary Bible format (.beblia) support with converter tool
Oct 23, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
This PR adds support for a new efficient binary Bible format (
.beblia) alongside the existing XML format, making Bible data loading faster and file sizes smaller while maintaining full backwards compatibility.Changes
Beblia.Sharp Library Updates
SaveBinary()methods on theBibleclass to save Bible data in binary formatBibleParser.Load()to automatically detect and parse both XML and binary filesLoadBinary()method to efficiently parse.bebliafilesNew Beblia.Converter Tool
Created a new command-line application for converting XML Bible files to binary format:
Example usage:
Updated ConsoleSample
Enhanced the sample application to demonstrate:
Benefits
🎯 17% smaller files: Binary format reduces file size significantly (5.0MB → 4.1MB for the sample KJV Bible)
⚡ Faster loading: Binary parsing is more efficient than XML parsing
🔄 Seamless API: Same methods work for both formats -
BibleParser.Load()handles everything🔍 Auto-detection: Format is detected automatically, no code changes needed
🛠️ Easy conversion: Dedicated converter tool supports single and batch operations
Binary Format Details
The
.bebliaformat uses:BEBLIA) for reliable format detectionTesting
All features have been thoroughly tested:
Documentation
Added comprehensive
README.mdwith:Closes the issue requesting binary Bible format support.
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.