Skip to content

Commit

Permalink
fix archive dep
Browse files Browse the repository at this point in the history
  • Loading branch information
alextekartik committed Dec 8, 2024
1 parent 4248ea4 commit d46b710
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 4 additions & 4 deletions app_archive/lib/src/gzip_impl.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import 'package:tekartik_common_utils/byte_utils.dart';
/// GZip some text
Uint8List gzipText(String text, {bool? noDate}) {
noDate ??= false;
var data = GZipEncoder().encode(utf8.encode(text))!;
var data = const GZipEncoder().encode(utf8.encode(text));
if (noDate) {
data[4] = 0;
data[5] = 0;
Expand All @@ -19,13 +19,13 @@ Uint8List gzipText(String text, {bool? noDate}) {

/// Un Gzip some data into text
String ungzipText(Uint8List data) {
return utf8.decode(GZipDecoder().decodeBytes(data));
return utf8.decode(const GZipDecoder().decodeBytes(data));
}

/// GZip some bytes
Uint8List gzipBytes(Uint8List bytes, {bool? noDate}) {
noDate ??= false;
var data = GZipEncoder().encode(bytes)!;
var data = const GZipEncoder().encode(bytes);
if (noDate) {
data[4] = 0;
data[5] = 0;
Expand All @@ -38,5 +38,5 @@ Uint8List gzipBytes(Uint8List bytes, {bool? noDate}) {
/// Un Gzip some data into bytes
/// Un Gzip some data into text
Uint8List ungzipBytes(Uint8List data) {
return asUint8List(GZipDecoder().decodeBytes(data));
return asUint8List(const GZipDecoder().decodeBytes(data));
}
2 changes: 2 additions & 0 deletions app_archive/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,5 @@ dev_dependencies:
process_run: ">=1.2.1+1"
build_runner: ">=2.4.13"
build_test:
dependency_overrides:
archive: ">=4.0.0"

0 comments on commit d46b710

Please sign in to comment.