6

How can i extract bz2 file in Java on Android? Are any included libraries in android?

hippietrail
  • 15,848
  • 18
  • 99
  • 158
bordeux
  • 612
  • 1
  • 8
  • 23

1 Answers1

8

My best bet would be to try Apache Commons Compress. It has a built-in bzip2 (de)compressor: example. I'm not particularly sure though it will run on Android out of the box, but worth a try I'd say.

Alternatively, you might want to take a look at the bzip2/libzip2 library compiled for Android.

MH.
  • 45,303
  • 10
  • 103
  • 116
  • The second link is dead. There seems to be a copy [here](https://github.com/Intermodalics/cosp-android-bzip2) but it's older than your answer so I don't know which is the original... – hippietrail Jan 08 '21 at 13:54