compress/bzip2:Why is there only a decompression function, no compression function.

308 views
Skip to first unread message

lziq...@gmail.com

unread,
Jun 8, 2020, 12:59:57 PM6/8/20
to golang-nuts
Why is there no bzip2 compression algorithm, what is the reason? Do you need to add it?

Sam Whited

unread,
Jun 8, 2020, 1:15:12 PM6/8/20
to golan...@googlegroups.com
See: https://github.com/golang/go/issues/4828

On Mon, Jun 8, 2020, at 05:09, lziq...@gmail.com wrote:
> Why is there no bzip2 compression algorithm, what is the reason? Do you
> need to add it?

—Sam

Dan Kortschak

unread,
Jun 8, 2020, 5:30:34 PM6/8/20
to golan...@googlegroups.com
Also see https://godoc.org/github.com/dsnet/compress/bzip2 and
https://github.com/dsnet/compress/issues/58
> --
> You received this message because you are subscribed to the Google
> Groups "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it,
> send an email to golang-nuts...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/golang-nuts/4e2007ea-0215-41d3-afdc-1f77330dbdbd%40www.fastmail.com
> .


lziq...@gmail.com

unread,
Jun 8, 2020, 9:55:53 PM6/8/20
to golang-nuts

It seems that this issue was discussed long ago, but why is it not compressed because of the lack of reviewers? Why has this code called Joe Tsai never been merged? Does anyone have an official explanation?
I don't understand too much.
在 2020年6月9日星期二 UTC+8上午5:30:34,kortschak写道:
Also see https://godoc.org/github.com/dsnet/compress/bzip2 and
https://github.com/dsnet/compress/issues/58

On Mon, 2020-06-08 at 13:14 -0400, Sam Whited wrote:
> See: https://github.com/golang/go/issues/4828
>
> On Mon, Jun 8, 2020, at 05:09, lziq...@gmail.com wrote:
> > Why is there no bzip2 compression algorithm, what is the reason? Do
> > you
> > need to add it?
>
> —Sam
>
> --
> You received this message because you are subscribed to the Google
> Groups "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it,
> send an email to golan...@googlegroups.com.

Dan Kortschak

unread,
Jun 8, 2020, 10:06:54 PM6/8/20
to golan...@googlegroups.com
bzip2 compression is not trivial so making sure the review catches any
issues will take time. Finding people with the relevant expertise and
the time to do the review is not necessarily easy.

Note that you can use the dsnet package.
> send an email to golang-nuts...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/golang-nuts/d1ee336c-5ba7-4a60-9dc3-48f9d3141704o%40googlegroups.com
> .


Michael Jones

unread,
Jun 9, 2020, 10:07:29 AM6/9/20
to Dan Kortschak, golang-nuts
Chapter 13 in 'The Go Programming Language" uses bzip as an example of CGO integration. Book is good, code is here:



--
Michael T. Jones
michae...@gmail.com

Joe Tsai

unread,
Jun 11, 2020, 12:37:30 AM6/11/20
to golang-nuts
> Why has this code called Joe Tsai never been merged?

I am Joe Tsai and the reason why my bzip2 encoder implementation has not been merged is because I have not had time to do it. Though I am a contributor to the standard library, curating and improving it is not my primary responsibility. In contrast, my other responsibilities have continually kept any intention to merge the bzip2 encoder implementation at the bottom of the task list. The most complicated portion of a bzip2 encoder is the implementation for a suffix array construction algorithm (SACA). Such algorithms are fairly complex and require quite an investment by the reviewer to understand. Given that its' been years since I touched the code, I would hardly consider myself well-versed in SACAs at this point in time.

JT

lziq...@gmail.com

unread,
Jun 11, 2020, 2:53:50 AM6/11/20
to golang-nuts

My goodness, it is a great honor to get your detailed explanation. It seems that this is a fairly complicated algorithm. If I have time and can solve this problem, I try to solve it. Thank you.
在 2020年6月11日星期四 UTC+8下午12:37:30,Joe Tsai写道:

Heisenberg

unread,
Jul 27, 2020, 12:31:25 PM7/27/20
to golang-nuts
I added the issue in golang/issue. I have some time now. I want to work for you, but I don't know how to do it.
Reply all
Reply to author
Forward
0 new messages