regex fix

This commit is contained in:
rebelonion 2024-01-20 22:51:24 -06:00
parent b018d0f090
commit 45a341397b
3 changed files with 8 additions and 10 deletions

View file

@ -85,10 +85,10 @@ query {
return a
}
fun decodeToString(res: NiceResponse?): String? {
private fun decodeToString(res: NiceResponse?): String? {
return when (res?.headers?.get("Content-Encoding")) {
"gzip" -> {
res.body.byteStream()?.use { inputStream ->
res.body.byteStream().use { inputStream ->
GZIPInputStream(inputStream).use { gzipInputStream ->
InputStreamReader(gzipInputStream).use { reader ->
reader.readText()