Skip to content

Commit

Permalink
Merge pull request #30 from guardian/mc-update-brotli-dep
Browse files Browse the repository at this point in the history
Update Brotli4J dependency to latest
  • Loading branch information
mchv authored Jan 8, 2024
2 parents 7c08869 + 094570a commit 76eeb19
Show file tree
Hide file tree
Showing 20 changed files with 17 additions and 58 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
show-progress: false

- name: Setup java
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: '11'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,52 +61,4 @@ class BrotliCompressor(level: Int = BrotliCompressor.DefaultQuality) extends Com
/** Make sure any resources have been released */
override final def close(): Unit = {}

}


/*
public BrotliOutputStream(OutputStream destination, Encoder.Parameters params)
*/



/*
public BrotliEncoderChannel(WritableByteChannel destination, Encoder.Parameters params)
throws IOException {
*/


/*
protected def flushWithBuffer(buffer: Array[Byte]): ByteString = {
val written = deflater.deflate(buffer, 0, buffer.length, Deflater.SYNC_FLUSH)
ByteString.fromArray(buffer, 0, written)
}
private def newTempBuffer(size: Int = 65536): Array[Byte] = {
// The default size is somewhat arbitrary, we'd like to guess a better value but Deflater/zlib
// is buffering in an unpredictable manner.
// `compress` will only return any data if the buffered compressed data has some size in
// the region of 10000-50000 bytes.
// `flush` and `finish` will return any size depending on the previous input.
// This value will hopefully provide a good compromise between memory churn and
// excessive fragmentation of ByteStrings.
// We also make sure that buffer size stays within a reasonable range, to avoid
// draining deflator with too small buffer.
new Array[Byte](math.max(size, MinBufferSize))
}
}
*/



}
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ lazy val sharedSettings = Seq(
publishConfiguration := publishConfiguration.value.withOverwrite(true)
)

val Brotli4jVersion = "1.12.0"
val Brotli4jVersion = "1.15.0"
lazy val common = project
.settings(
sharedSettings,
Expand Down
Binary file removed common/lib/native-linux-aarch64-1.12.0.jar
Binary file not shown.
Binary file added common/lib/native-linux-aarch64-1.15.0.jar
Binary file not shown.
Binary file removed common/lib/native-linux-armv7-1.12.0.jar
Binary file not shown.
Binary file added common/lib/native-linux-armv7-1.15.0.jar
Binary file not shown.
Binary file added common/lib/native-linux-ppc64le-1.15.0.jar
Binary file not shown.
Binary file added common/lib/native-linux-riscv64-1.15.0.jar
Binary file not shown.
Binary file added common/lib/native-linux-s390x-1.15.0.jar
Binary file not shown.
Binary file removed common/lib/native-linux-x86_64-1.12.0.jar
Binary file not shown.
Binary file added common/lib/native-linux-x86_64-1.15.0.jar
Binary file not shown.
Binary file removed common/lib/native-osx-aarch64-1.12.0.jar
Binary file not shown.
Binary file added common/lib/native-osx-aarch64-1.15.0.jar
Binary file not shown.
Binary file removed common/lib/native-osx-x86_64-1.12.0.jar
Binary file not shown.
Binary file added common/lib/native-osx-x86_64-1.15.0.jar
Binary file not shown.
Binary file added common/lib/native-windows-aarch64-1.15.0.jar
Binary file not shown.
Binary file removed common/lib/native-windows-x86_64-1.12.0.jar
Binary file not shown.
Binary file added common/lib/native-windows-x86_64-1.15.0.jar
Binary file not shown.
21 changes: 14 additions & 7 deletions scripts/update-lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,18 @@

cd ../common/lib/

version='1.12.0'
version='1.15.0'

curl -OJ -# "https://repo1.maven.org/maven2/com/aayushatharva/brotli4j/native-osx-aarch64/${version}/native-osx-aarch64-${version}.jar"
curl -OJ -# "https://repo1.maven.org/maven2/com/aayushatharva/brotli4j/native-osx-x86_64/${version}/native-osx-x86_64-${version}.jar"
curl -OJ -# "https://repo1.maven.org/maven2/com/aayushatharva/brotli4j/native-windows-x86_64/${version}/native-windows-x86_64-${version}.jar"
curl -OJ -# "https://repo1.maven.org/maven2/com/aayushatharva/brotli4j/native-linux-x86_64/${version}/native-linux-x86_64-${version}.jar"
curl -OJ -# "https://repo1.maven.org/maven2/com/aayushatharva/brotli4j/native-linux-aarch64/${version}/native-linux-aarch64-${version}.jar"
curl -OJ -# "https://repo1.maven.org/maven2/com/aayushatharva/brotli4j/native-linux-armv7/${version}/native-linux-armv7-${version}.jar"
for platform in 'native-osx-aarch64' \
'native-osx-x86_64' \
'native-windows-x86_64' \
'native-windows-aarch64' \
'native-linux-x86_64' \
'native-linux-aarch64' \
'native-linux-armv7' \
'native-linux-s390x' \
'native-linux-riscv64' \
'native-linux-ppc64le'
do
curl -OJ -# "https://repo1.maven.org/maven2/com/aayushatharva/brotli4j/${platform}/${version}/${platform}-${version}.jar"
done

0 comments on commit 76eeb19

Please sign in to comment.