Skip to content

Commit

Permalink
Fix z tool output, and show original/compressed sizes (#181)
Browse files Browse the repository at this point in the history
* show sizes in z, adds , and ; to z output
  • Loading branch information
Jerboa-app authored Apr 12, 2024
1 parent 026c56d commit f86cd0f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tools/z/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ int main(int argc, char ** argv)

std::ofstream out(file+".z",std::ios::binary);

std::cout << "Input/Compressed length: " << bytes.size() << " / " << zd.size() << "\n";

if (argc >= 3)
{
std::string option = argv[2];
Expand Down Expand Up @@ -88,7 +90,7 @@ int main(int argc, char ** argv)

if (w >= width)
{
out << "\n";
out << ",\n";
w = 0;
}
else if (n < zd.size()-1)
Expand All @@ -97,7 +99,7 @@ int main(int argc, char ** argv)
}
n+=1;
}
out << "}";
out << "};";
}
else
{
Expand Down

0 comments on commit f86cd0f

Please sign in to comment.