Skip to content

Commit b27ed8a

Browse files
committed
Add all compression level
1 parent 1dfd40e commit b27ed8a

File tree

1 file changed

+88
-0
lines changed

1 file changed

+88
-0
lines changed

src/main/java/de/bluecolored/bluemap/brotli/BlueMapBrotli.java

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,94 @@ public void run() {
2121
out -> new BrotliOutputStream(out, new Encoder.Parameters().setQuality(5)),
2222
BrotliInputStream::new
2323
));
24+
25+
Compression.REGISTRY.register(new BufferedCompression(
26+
new Key("bluemap-brotli", "brotli-1"),
27+
"br",
28+
".br",
29+
out -> new BrotliOutputStream(out, new Encoder.Parameters().setQuality(1)),
30+
BrotliInputStream::new
31+
));
32+
33+
Compression.REGISTRY.register(new BufferedCompression(
34+
new Key("bluemap-brotli", "brotli-2"),
35+
"br",
36+
".br",
37+
out -> new BrotliOutputStream(out, new Encoder.Parameters().setQuality(2)),
38+
BrotliInputStream::new
39+
));
40+
41+
Compression.REGISTRY.register(new BufferedCompression(
42+
new Key("bluemap-brotli", "brotli-3"),
43+
"br",
44+
".br",
45+
out -> new BrotliOutputStream(out, new Encoder.Parameters().setQuality(3)),
46+
BrotliInputStream::new
47+
));
48+
49+
Compression.REGISTRY.register(new BufferedCompression(
50+
new Key("bluemap-brotli", "brotli-4"),
51+
"br",
52+
".br",
53+
out -> new BrotliOutputStream(out, new Encoder.Parameters().setQuality(4)),
54+
BrotliInputStream::new
55+
));
56+
57+
Compression.REGISTRY.register(new BufferedCompression(
58+
new Key("bluemap-brotli", "brotli-5"),
59+
"br",
60+
".br",
61+
out -> new BrotliOutputStream(out, new Encoder.Parameters().setQuality(5)),
62+
BrotliInputStream::new
63+
));
64+
65+
Compression.REGISTRY.register(new BufferedCompression(
66+
new Key("bluemap-brotli", "brotli-6"),
67+
"br",
68+
".br",
69+
out -> new BrotliOutputStream(out, new Encoder.Parameters().setQuality(6)),
70+
BrotliInputStream::new
71+
));
72+
73+
Compression.REGISTRY.register(new BufferedCompression(
74+
new Key("bluemap-brotli", "brotli-7"),
75+
"br",
76+
".br",
77+
out -> new BrotliOutputStream(out, new Encoder.Parameters().setQuality(7)),
78+
BrotliInputStream::new
79+
));
80+
81+
Compression.REGISTRY.register(new BufferedCompression(
82+
new Key("bluemap-brotli", "brotli-8"),
83+
"br",
84+
".br",
85+
out -> new BrotliOutputStream(out, new Encoder.Parameters().setQuality(8)),
86+
BrotliInputStream::new
87+
));
88+
89+
Compression.REGISTRY.register(new BufferedCompression(
90+
new Key("bluemap-brotli", "brotli-9"),
91+
"br",
92+
".br",
93+
out -> new BrotliOutputStream(out, new Encoder.Parameters().setQuality(9)),
94+
BrotliInputStream::new
95+
));
96+
97+
Compression.REGISTRY.register(new BufferedCompression(
98+
new Key("bluemap-brotli", "brotli-10"),
99+
"br",
100+
".br",
101+
out -> new BrotliOutputStream(out, new Encoder.Parameters().setQuality(10)),
102+
BrotliInputStream::new
103+
));
104+
105+
Compression.REGISTRY.register(new BufferedCompression(
106+
new Key("bluemap-brotli", "brotli-11"),
107+
"br",
108+
".br",
109+
out -> new BrotliOutputStream(out, new Encoder.Parameters().setQuality(11)),
110+
BrotliInputStream::new
111+
));
24112
}
25113

26114
}

0 commit comments

Comments
 (0)