Skip to content
This repository has been archived by the owner on Jul 31, 2024. It is now read-only.

Commit

Permalink
compress -data files too
Browse files Browse the repository at this point in the history
  • Loading branch information
sambaas committed May 7, 2024
1 parent e8efbb0 commit 44d08b0
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ All notable changes to this package will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [0.3.0] - 07-5-2024

### Added

- Compress *-data.bin as well next to *.bin files if compression is enabled


## [0.2.0] - 15-4-2024

### Added
Expand Down
14 changes: 11 additions & 3 deletions TileBakeLibrary/CityJSONToTileConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -431,10 +431,18 @@ private static void WriteParsingStatusToConsole(int skipped, int done, int parsi
/// </summary>
public void CompressFiles()
{
var filter = $"*{lod}.bin";
var binFilesFilter = $"*{lod}.bin";
var dataFilesFilter = $"*{lod}-data.bin";

string[] binFiles = Directory.GetFiles(Path.GetDirectoryName(outputPath), binFilesFilter);
string[] binDataFiles = Directory.GetFiles(Path.GetDirectoryName(outputPath), dataFilesFilter);

List<string> allFiles = new List<string>();
allFiles.AddRange(binFiles);
allFiles.AddRange(binDataFiles);

binFiles = allFiles.ToArray();

//List the files that we are going to parse
string[] binFiles = Directory.GetFiles(Path.GetDirectoryName(outputPath), filter);
Stopwatch watch = new Stopwatch();
watch.Start();
int compressedCount = 0;
Expand Down

0 comments on commit 44d08b0

Please sign in to comment.