mirror of
https://github.com/wanghongenpin/proxypin.git
synced 2026-05-20 16:15:47 +08:00
搜索功能增强,可直接搜索响应类型和请求方法, 支持brotli编码
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:brotli/brotli.dart';
|
||||
|
||||
///GZIP 解压缩
|
||||
List<int> gzipDecode(List<int> byteBuffer) {
|
||||
GZipCodec gzipCodec = GZipCodec();
|
||||
@@ -11,7 +13,17 @@ List<int> gzipDecode(List<int> byteBuffer) {
|
||||
}
|
||||
}
|
||||
|
||||
///GZIP 解压缩
|
||||
///GZIP 压缩
|
||||
List<int> gzipEncode(List<int> input) {
|
||||
return GZipCodec().encode(input);
|
||||
}
|
||||
|
||||
///br 解压缩
|
||||
List<int> brDecode(List<int> byteBuffer) {
|
||||
try {
|
||||
return brotli.decode(byteBuffer);
|
||||
} catch (e) {
|
||||
print("brDecode error: $e");
|
||||
return byteBuffer;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,3 +18,10 @@ class Strings {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
class Pair<K, V> {
|
||||
final K key;
|
||||
final V value;
|
||||
|
||||
Pair(this.key, this.value);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user