Fast UZ compressor, drop-in replacement UCC.exe for compress/decompress unreal .uz files

External tools, software and sites for creating or editing UT99 resources.
User avatar
Barbie
Godlike
Posts: 2478
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: Fast UZ compressor, drop-in replacement UCC.exe for compress/decompress unreal .uz files

Post by Barbie » Sat Sep 19, 2020 8:57 pm

When path or file names contain spaces, you have to use double quotes:
uz.exe decompress "L:\a revisar y grabar\TODO UT99\uzmedor modificado\AS MAPS UT\AF-DM-Asterous.unr.uz"
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett

User avatar
sektor2111
Godlike
Posts: 6028
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: Fast UZ compressor, drop-in replacement UCC.exe for compress/decompress unreal .uz files

Post by sektor2111 » Sat Sep 19, 2020 11:04 pm

Good luck with those SPACE chars in names/folders/everything. SPACE is a character used for separating a command from switches (options) not for common usage... If you insist in using SPACE you'll won't get anywhere.
Right now I was testing decompression (not a common usage for players...). I did not see any problem because I'M NOT USING SPACE in any folder or file name :omfg: .

Buggie
Godlike
Posts: 1762
Joined: Sat Mar 21, 2020 5:32 am

Re: Fast UZ compressor, drop-in replacement UCC.exe for compress/decompress unreal .uz files

Post by Buggie » Sat Sep 19, 2020 11:22 pm

If any patch contain space (or other special chars) it must be quoted.
Wrong:
uz decompress C:\My aWeSoMe FoLdEr/Map.unr.uz
Right:
uz decompress "C:\My aWeSoMe FoLdEr/Map.unr.uz"

Better not use path with spaces at all.

darksonny
Adept
Posts: 364
Joined: Sat Sep 13, 2008 10:24 pm

Re: Fast UZ compressor, drop-in replacement UCC.exe for compress/decompress unreal .uz files

Post by darksonny » Sun Sep 20, 2020 10:06 am

Thanks all it worked well!

Buggie
Godlike
Posts: 1762
Joined: Sat Mar 21, 2020 5:32 am

Re: Fast UZ compressor, drop-in replacement UCC.exe for compress/decompress unreal .uz files

Post by Buggie » Wed Sep 23, 2020 9:22 am

New version v4.0:

- faster compress

https://github.com/SeriousBuggie/UZ/releases/latest

Code: Select all

uz compress CTF-Blice-Alpha.unr
Used 8 threads.
Compressing CTF-Blice-Alpha.unr (87328898 bytes)
stage 0: 0.562000 secs
stage 1: 1.372000 secs
stage 2: 1.826000 secs
stage 3: 1.295000 secs
Total: 5.055000 secs
Compressed CTF-Blice-Alpha.unr -> CTF-Blice-Alpha.unr.uz (20%)

Code: Select all

uz compress E1M4.umx
Used 8 threads.
Compressing E1M4.umx (98087852 bytes)
stage 0: 0.686000 secs
stage 1: 3.510000 secs
stage 2: 10.905000 secs
stage 3: 7.894000 secs
Total: 22.994999 secs
Compressed E1M4.umx -> E1M4.umx.uz (95%)

Code: Select all

uz compress AS-HiSpeed.unr
Used 8 threads.
Compressing AS-HiSpeed.unr (4418189 bytes)
stage 0: 0.031000 secs
stage 1: 0.140000 secs
stage 2: 0.124000 secs
stage 3: 0.109000 secs
Total: 0.404000 secs
Compressed AS-HiSpeed.unr -> AS-HiSpeed.unr.uz (29%)

Code: Select all

uz decompress CTF-Blice-Alpha.unr.uz
Used 8 threads.
stage 0: 0.796000 secs
stage 1: 1.061000 secs
stage 2: 0.640000 secs
stage 3: 0.343000 secs
Total: 2.840000 secs
Decompressed CTF-Blice-Alpha.unr.uz -> CTF-Blice-Alpha.unr

Code: Select all

uz decompress E1M4.umx.uz
Used 8 threads.
stage 0: 3.354000 secs
stage 1: 4.727000 secs
stage 2: 1.450000 secs
stage 3: 0.437000 secs
Total: 9.968000 secs
Decompressed E1M4.umx.uz -> E1M4.umx

Code: Select all

uz decompress AS-HiSpeed.unr.uz
Used 8 threads.
stage 0: 0.062000 secs
stage 1: 0.078000 secs
stage 2: 0.047000 secs
stage 3: 0.015000 secs
Total: 0.202000 secs
Decompressed AS-HiSpeed.unr.uz -> AS-HiSpeed.unr

User avatar
Barbie
Godlike
Posts: 2478
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: Fast UZ compressor, drop-in replacement UCC.exe for compress/decompress unreal .uz files

Post by Barbie » Sun Sep 27, 2020 2:32 am

Is it possible to get a static compiled version of this program for linux?
UZ.cpp:11:18: fatal error: Core.h: No such file or directory
compilation terminated.
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett

Buggie
Godlike
Posts: 1762
Joined: Sat Mar 21, 2020 5:32 am

Re: Fast UZ compressor, drop-in replacement UCC.exe for compress/decompress unreal .uz files

Post by Buggie » Sun Sep 27, 2020 6:21 am

At the moment this utility is only for windows. The source will not compile for Linux.

User avatar
Que
Masterful
Posts: 671
Joined: Mon Dec 09, 2019 5:49 am
Personal rank: ...

Re: Fast UZ compressor, drop-in replacement UCC.exe for compress/decompress unreal .uz files

Post by Que » Fri Oct 09, 2020 10:19 am

how do you compress bulk files with this?

Code: Select all

uz compress *.u [blah] [blah]

Code: Select all

UZcompressor>uz compress *.unr
Used 4 threads.
Compressing *.unr (-1 bytes)
Source *.unr not found
*Join our Discord Here.*
Our most popular mods - MVX , SSB , SmartWFL , UTCmds
Show
~Our Servers~

User avatar
Barbie
Godlike
Posts: 2478
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: Fast UZ compressor, drop-in replacement UCC.exe for compress/decompress unreal .uz files

Post by Barbie » Fri Oct 09, 2020 11:56 am

Code: Select all

FOR %i IN (*.u) DO uz.exe compress %i
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett

User avatar
Que
Masterful
Posts: 671
Joined: Mon Dec 09, 2019 5:49 am
Personal rank: ...

Re: Fast UZ compressor, drop-in replacement UCC.exe for compress/decompress unreal .uz files

Post by Que » Fri Oct 09, 2020 11:59 am

well thats tricky...
*Join our Discord Here.*
Our most popular mods - MVX , SSB , SmartWFL , UTCmds
Show
~Our Servers~

User avatar
sektor2111
Godlike
Posts: 6028
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: Fast UZ compressor, drop-in replacement UCC.exe for compress/decompress unreal .uz files

Post by sektor2111 » Fri Oct 09, 2020 2:25 pm

It works normally

Code: Select all

E:\UZ\UZ.EXE compress E:\Editor\UnrealTournament\Sounds\*.uax
Go to prepare a coffee, until is ready all are compressed and... waiting next move...

Also it works in a batch using a switch %1.

Where %1 is path containing *.ext - ext being any Unreal extension and not only Unreal.

Sample:

Code: Select all

@echo off
IF not exist %1 (
echo You must specify path source for UZ compresion
goto End
)
echo Compressing %1 in UZ format
..\SysUZ\UZ compress %1 newformat buffer=65536
:End
pause
exit
else

Code: Select all

@echo off
IF not exist %1 (
echo You must specify path source for UZ compresion
goto End
)
echo Compressing %1 in UZ format
..\SysUZ\UZ compress %1
:End
pause
exit
Where SysUZ is a folder inside UT and command is launched from System - %1 can be a full path containing files.

Buggie
Godlike
Posts: 1762
Joined: Sat Mar 21, 2020 5:32 am

Re: Fast UZ compressor, drop-in replacement UCC.exe for compress/decompress unreal .uz files

Post by Buggie » Fri Oct 09, 2020 2:46 pm

Yes and no.
UZ nothing to do with masks and other stuff. It is just works on args as target files.
All other depends from your command interpreter. For example if you run

Code: Select all

uz compress *.unr
in cmd then uz get third param as "*.unr" and try work with it as with exact file name.
So you see this error.
But if your command interpreter expand *.unr to all files in current dir matched this mask, then all work fine, because reall command which get uz look like:

Code: Select all

uz compress map1.unr map2.unr ... mapN.unr
and UZ work on files one by one.
For example this call bash on windows which do this job:

Code: Select all

bash -c './uz.exe compress *.unr'
Of course on plain cmd you need FOR loop as mentioned above.

User avatar
sektor2111
Godlike
Posts: 6028
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: Fast UZ compressor, drop-in replacement UCC.exe for compress/decompress unreal .uz files

Post by sektor2111 » Fri Oct 09, 2020 3:00 pm

Ooops... I was in another folder where batch file has used UCC...

But I think I can generate a list with files and pasting compressing command in front of each name... and firing it as BAT.

In other hand... in my case this worked tested

Code: Select all

@Echo off
Echo Compressing Audio folder
FOR %%i IN (..\Sounds\*.uax) DO ..\SysUZ\UZ compress %%i
pause
exit
Using "%%" not "%". Command has been launched from System accessing Sounds folder.

Yep... I'll prepare a folder for UZ files...

User avatar
Barbie
Godlike
Posts: 2478
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: Fast UZ compressor, drop-in replacement UCC.exe for compress/decompress unreal .uz files

Post by Barbie » Fri Oct 09, 2020 7:52 pm

sektor2111 wrote:
Fri Oct 09, 2020 2:25 pm

Code: Select all

IF not exist %1 (
A hint: if no parameter is given, %1 is NULL and the command interpreter gets the line

Code: Select all

IF not exist (
and throws the error Syntax Error. Just add double quotes around the %1:

Code: Select all

IF not exist "%1" (
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett

User avatar
sektor2111
Godlike
Posts: 6028
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: Fast UZ compressor, drop-in replacement UCC.exe for compress/decompress unreal .uz files

Post by sektor2111 » Fri Oct 09, 2020 8:44 pm

:noidea
I used it without quotes, nothing happened... but I'll follow your advice if it's better.