Skip to content

Commit

Permalink
Remove compression from encoding
Browse files Browse the repository at this point in the history
  • Loading branch information
dcvz committed Jan 26, 2023
1 parent 113ed9a commit 04a1d37
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/features/create/create_finish/create_finish_viewmodel.dart
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,8 @@ class CreateFinishViewModel with ChangeNotifier {
if (entry.value is CustomStageEntry) {
for (var file in (entry.value as CustomStageEntry).files) {
String fileName = "${entry.key}/${file.path.split("/").last}";
String? fileHandle = await SFileCreateFile(mpqHandle!, fileName, file.lengthSync(), MPQ_FILE_COMPRESS);
await SFileWriteFile(fileHandle!, file.readAsBytesSync(), file.lengthSync(), MPQ_COMPRESSION_ZLIB);
String? fileHandle = await SFileCreateFile(mpqHandle!, fileName, file.lengthSync(), 0);
await SFileWriteFile(fileHandle!, file.readAsBytesSync(), file.lengthSync(), 0);
await SFileFinishFile(fileHandle);
}
} else if (entry.value is CustomSequencesEntry) {
Expand All @@ -177,9 +177,9 @@ class CreateFinishViewModel with ChangeNotifier {
String fileName = "${entry.key}/${sequence.path}";
Uint8List data = sequence.build();
String? fileHandle = await SFileCreateFile(
mpqHandle!, fileName, data.length, MPQ_FILE_COMPRESS);
mpqHandle!, fileName, data.length, 0);
await SFileWriteFile(
fileHandle!, data, data.length, MPQ_COMPRESSION_ZLIB);
fileHandle!, data, data.length, 0);
await SFileFinishFile(fileHandle);
}
} else if (entry.value is CustomTexturesEntry) {
Expand All @@ -194,9 +194,9 @@ class CreateFinishViewModel with ChangeNotifier {
if (data != null) {
String fileName = "${entry.key}/$textureName";
String? fileHandle = await SFileCreateFile(
mpqHandle!, fileName, data.length, MPQ_FILE_COMPRESS);
mpqHandle!, fileName, data.length, 0);
await SFileWriteFile(
fileHandle!, data, data.length, MPQ_COMPRESSION_ZLIB);
fileHandle!, data, data.length, 0);
await SFileFinishFile(fileHandle);
} else {
presentErrorSnackbar("Failed to process $textureName");
Expand Down

0 comments on commit 04a1d37

Please sign in to comment.