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

[Question] Native java port #14

Open
bmarwell opened this issue May 2, 2019 · 15 comments
Open

[Question] Native java port #14

bmarwell opened this issue May 2, 2019 · 15 comments

Comments

@bmarwell
Copy link

bmarwell commented May 2, 2019

Hi!

I'm very interested in this project, although I (personally) have no use case right now. But I really like the idea of this concept and that existing standards (like HTTP GET range requests) are being used.

I was wondering if it is possible to create a java-only port. From what I see in the spec, I'd say: Yes, this should be possible.

The only thing which may be a bit tricky is the zstd part. As for now, there is no native java implementation (only a jni binding).
Hint: If you were going to add more compression algorithms (brotli, lz4 and lz5/lizard might be good candidates): There are at least JNI-bindings for brotli and lz4 available. lz4 is also available in plain java.

So, I'm still looking for use cases and hope that a java port would be feasible. If you do have any suggestions and/or ideas, I'd love to hear them!

@bmarwell bmarwell changed the title Native java port [Question] Native java port May 2, 2019
@jdieter
Copy link
Member

jdieter commented May 11, 2019

Sorry it's taken me so long to respond. I've been on holiday and then just started a new job.

My thoughts on a pure java port are:

  • Brilliant! I'd love to see one
  • Any compression algorithms added to the Java port would also need to be added to the C library (the format is extensible to add new compression algorithms)

@bmarwell
Copy link
Author

Hi,

no worries. I do not have any use cases at the moment and would likely not start before there is one. My best idea so far was: F-Droid. Haven't used it lately, but downloading repository metadata was always slow.

So I might just start with the no-compression, as soon as there is a use case.

@bmarwell
Copy link
Author

Here you go (WIP): https://github.com/bmhm/zchunk-java

@jdieter
Copy link
Member

jdieter commented May 18, 2019

Nice work! If you wanted to move it into the zchunk org here on github, I'd be happy to do that, even this early on.

@bmarwell
Copy link
Author

Sure, let me just change the package names first. io.github.zchunk?

I'd love to see some more people interested in this, I might not be able to support it as much as I wanted to..

@jdieter
Copy link
Member

jdieter commented May 19, 2019

Ok, I've added you as a member. Can you please verify that you have commit access? I'll be available for the next 3-4 hours, as it's Sunday evening here.

@bmarwell
Copy link
Author

bmarwell commented May 19, 2019

Hi, I tried to transfer it, but I get this error: You don’t have the permission to create repositories on zchunk.

I though there would be a message like "waiting for approval", but there is no such message.

// Edit: Is there a slack for zchunk already? :)

@jdieter
Copy link
Member

jdieter commented May 19, 2019

Have you accepted the invitation to the zchunk org?

@bmarwell
Copy link
Author

Thanks for the hint… it's now "ours" ;-) https://github.com/zchunk/zchunk-java

@jdieter
Copy link
Member

jdieter commented May 19, 2019

Excellent! Glad to have you onboard. You should have the ability to add new collaborators to zchunk-java, change their permissions, etc. Let me know if you run into any problems.

@bmarwell
Copy link
Author

bmarwell commented May 19, 2019

Sure, thanks!
Feel free to update the readme or the wiki as needed. I wrote a page for the compressed int spec.

@bmarwell
Copy link
Author

I think before we close this issue, we should head over to the guys from https://github.com/f-droid and ask them if they are interested.
And also ask them if such a library needs special treatment for android.

@jdieter
Copy link
Member

jdieter commented May 25, 2019

I think f-droid (and android in general) is about apps. Unless a library is available as part of the Android API, I think it will need to be bundled with whatever apps use it.

@bmarwell
Copy link
Author

I do not want to make it available on F-Droid. I want the F-Droid app to use zchunk to download the repository metadata.

@jdieter
Copy link
Member

jdieter commented May 27, 2019

I'm sorry, I should have realized that that's what you meant. I suspect that they'll want a proof-of-concept before moving forward with it, but it sure wouldn't hurt to talk to them.

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

No branches or pull requests

2 participants