Skip to content

add arj compression - #815

Open
IgorZolin wants to merge 2 commits into
apache:masterfrom
IgorZolin:master
Open

IgorZolin wants to merge 2 commits into
apache:masterfrom
IgorZolin:master

Conversation

@IgorZolin

@IgorZolin IgorZolin commented Sep 18, 2026 •

Copy link
Copy Markdown

Thanks for your contribution to Apache Commons! Your help is appreciated!

Before you push a pull request, review this list:

  • Read the contribution guidelines for this project.
  • Read the ASF Generative Tooling Guidance if you use Artificial Intelligence (AI).
  • I used AI to create any part of, or all of, this pull request. Which AI tool was used to create this pull request, and to what extent did it contribute? (opencode + Big Pickle)
  • Run a successful build using the default Maven goal with mvn; that's mvn on the command line by itself.
  • Write unit tests that match behavioral changes, where the tests fail if the changes to the runtime are not applied. This may not always be possible, but it is a best practice.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Each commit in the pull request should have a meaningful subject line and body. Note that a maintainer may squash commits during the merge process.

Add arj archives decompression.

package org.apache.commons.compress.archivers.arj;

/**
* Circular byte buffer. Copied from org.apache.commons.compress.archivers.lha.CircularBuffer and modified for ARJ.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@IgorZolin
Modified how? Can we reduce the copy pasta and have a shared implementation?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, it was not really modified, just don't want to change someones code. I could make lha.CircularBuffer public and reuse it (there would be some risk that changes in lha could broke arj).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's what unit tests are for ;)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You didn't follow the template instructions, so the build is broken...

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You didn't follow the template instructions, so the build is broken...

sorry, i've fix lint promlems, can we run build?

@fkjellberg

Copy link
Copy Markdown
Contributor

Hi @IgorZolin

Thanks for improving ARJ decompression support. Please take a look at my PR 812 which replaces the BinaryTree implementation with the new HuffmanDecoder for LHA. The same refactor should work here as well. It will improve code reuse and significantly reduce memory usage.

@IgorZolin

Copy link
Copy Markdown
Author

ok, i can pause my pr and update it after yours pr would be merged?

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.

3 participants