miyucy / brotli Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
Problem #1:
gem install brotli
does not work out of the Box for for darwin x64.
Problem #2:
Attempting to build from scratch does not work either, even with options such as arch -arm64
, arch -x86_x64
, or when running the terminal under Rosetta command line.
After some very manual processes, I was able to get some progress to get brotcli-0.4.0.gem
to build, but it failed on installing the extensions due to version linker errors with x86 package dependencies.
When brotli upgrades to 1.0.0 we should upgrade as well.
See google/brotli#483
Noticed you have bumped the version to 0.1.7 but it's not on rubygems yet. Can you push it up there? Thanks!
When I use this code:
> Brotli.deflate('hello ' * 100).bytesize
=> 21
It works reliably, and compresses very well.
But if I use this:
Brotli.deflate('hello ' * 100, 1).bytesize
It core dumps.
dump.txt
Well, I do understand that I shouldn't pass the 2nd integer argument. But it's also not a good thing to crash the whole Ruby environment. In case, this is rails for example, and someone is doing that in byebug or something, it will crash whole server - and leaves a bad impression.
So if we don't accept integer, we can always check the type and raise rb_eArgError
instead of crashing.
Writer implementation was added in #32 and @andrew-aladev suggested copying part of the code from ruby-brs
(#32 (comment)). The Reader implementation can be partially copied from ruby-brs/decompressor.c
.
It will help to add Brotli support to the http
gem (httprb/http#498). I'd like to come up with the PR.
@miyucy WDYT?
This library came up while working with a JRuby user on migrating, because they are using it via rack-brotli. I believe we could add support for Brotli compression using an existing JVM library pretty easily. Could we try to work together to get this in and merged for the gem, so we are not stopped by the native extension?
compiling brotli.c
In file included from brotli.c:1:
In file included from ./brotli.h:6:
./enc/encode.h:12:10: fatal error: '../common/types.h' file not found
#include "../common/types.h"
^
1 error generated.
make: *** [brotli.o] Error 1
That's because path vendor/brotli/common
doesn't exist in gemspec
:
https://github.com/miyucy/brotli/blob/master/brotli.gemspec#L18
The repo is missing a LICENSE file with by default means the code is proprietary and all rights reserved.
This causes the shared object to be built without any of the brotli code, causing error during run time
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.