Show HN: Samchika โ€“ A Java Library for Fast, Multithreaded File Processing

https://news.ycombinator.com/rss Hits: 8
Summary

Samchika Samchika (meaning File in Sanskrit) is a re-usable, easy-to-use, and extremely fast file processing library for the Java language. It is built with a strong focus on multithreading to handle CPU-intensive file processing tasks in parallel, enabling high performance even with massive files. ๐Ÿš€ Features ๐Ÿ” Fully multithreaded โ€“ optimized for parallel file processing. ๐Ÿงฉ Simple API โ€“ just plug in your file path and logic. ๐Ÿ“Š Optional runtime stats โ€“ time taken, memory used, thread-level info. ๐Ÿงช Ideal for processing and analyzing large text files (e.g. logs, datasets). (e.g. logs, datasets). ๐ŸŒ Open-source friendly โ€“ contributions are welcome! Use Cases Samchika excels in several scenarios where multithreaded file processing provides significant advantages: Log Analysis & Processing ETL (Extract, Transform, Load) Operations Large Text Corpus Processing Batch Report Generation Data Transformation Pipelines Real-time Data Processing See the examples directory for detailed implementations of these use cases. Quick Example java// Transform a large CSV file with optimal performance SmartFileProcessor.builder() .inputPath("large_dataset.csv") .outputPath("transformed_dataset.csv") .batchSize(10000) .lineProcessor(line -> line.toUpperCase()) .displayStats(true) .build() .execute(); ๐Ÿ“ฆ Installation Maven <repositories> <repository> <id>jitpack.io</id> <url>https://jitpack.io</url> </repository> </repositories> <dependencies> <dependency> <groupId>com.github.mayankpratap</groupId> <artifactId>samchika</artifactId> <version>1.0.0</version> </dependency> </dependencies> Gradle repositories { maven { url 'https://jitpack.io' } } dependencies { implementation 'com.github.mayankpratap:samchika:1.0.0' } ๐Ÿ› ๏ธ How to Use Step 1: Import the Library import com.samchika.SmartFileProcessor; Step 2: Client Code public static void main(String[] args) { SmartFileProcessor processor = SmartFileProcessor.builder() .inputPath("input.txt") // Path to the file to be processed .outputPath("output.t...

First seen: 2025-05-23 15:30

Last seen: 2025-05-23 22:31