brotli 0.8.0 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/ext/brotli/brotli.c +104 -85
- data/ext/brotli/brotli.h +0 -5
- data/ext/brotli/extconf.rb +113 -42
- data/lib/brotli/version.rb +1 -1
- metadata +5 -21
- data/.github/workflows/main.yml +0 -37
- data/.github/workflows/publish.yml +0 -24
- data/.gitignore +0 -18
- data/.gitmodules +0 -3
- data/.rspec +0 -2
- data/Dockerfile +0 -38
- data/Gemfile +0 -10
- data/Rakefile +0 -42
- data/bin/before_install.sh +0 -9
- data/bin/console +0 -14
- data/bin/setup +0 -8
- data/brotli.gemspec +0 -27
- data/smoke.sh +0 -8
- data/vendor/brotli/c/common/dictionary.bin +0 -432
- data/vendor/brotli/c/common/dictionary.bin.br +0 -0
- data/vendor/brotli/c/enc/static_init_lazy.cc +0 -26
|
Binary file
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
#include "../common/platform.h"
|
|
2
|
-
#include "../common/static_init.h"
|
|
3
|
-
#include "static_init.h"
|
|
4
|
-
|
|
5
|
-
#if (BROTLI_STATIC_INIT != BROTLI_STATIC_INIT_LAZY)
|
|
6
|
-
#error "BROTLI_STATIC_INIT should be BROTLI_STATIC_INIT_LAZY"
|
|
7
|
-
#else
|
|
8
|
-
void BrotliEncoderLazyStaticInit(void) {
|
|
9
|
-
/* From https://en.cppreference.com/w/cpp/language/storage_duration.html:
|
|
10
|
-
### Static block variables ###
|
|
11
|
-
Block variables with static or thread (since C++11) storage duration are
|
|
12
|
-
initialized the first time control passes through their declaration...
|
|
13
|
-
On all further calls, the declaration is skipped...
|
|
14
|
-
If multiple threads attempt to initialize the same static local variable
|
|
15
|
-
concurrently, the initialization occurs exactly once...
|
|
16
|
-
Usual implementations of this feature use variants of the double-checked
|
|
17
|
-
locking pattern, which reduces runtime overhead for already-initialized
|
|
18
|
-
local statics to a single non-atomic boolean comparison.
|
|
19
|
-
*/
|
|
20
|
-
static bool ok = [](){
|
|
21
|
-
BrotliEncoderLazyStaticInitInner();
|
|
22
|
-
return true;
|
|
23
|
-
}();
|
|
24
|
-
if (!ok) BROTLI_CRASH();
|
|
25
|
-
}
|
|
26
|
-
#endif /* BROTLI_STATIC_INIT_LAZY */
|