Is it possible for the server to send .bz2 files (located on a web server with fastDL) to a client using a resource.AddFile script? If so, will it be automatically extracted by the client?
[URL]http://wiki.garrysmod.com/?title=Fastdl#Bzip2_File_Compression[/URL]
TLDR: You resource.AddFile the normal file, then bzip the file and put it on the webserver, and the source engine does the rest.
Okay, so you're saying it would be
[lua]
resource.AddFile( "models/mymodels/example.mdl" )
[/lua]
and not
[lua]
resource.AddFile( "models/mymodels/example.mdl.bz2" )
[/lua]
Think of it this way...
Server -> Fast Download Server -> Bz2 files
Server Connection -> LUA -> Fast Download Server -> BZ2 files
You don't need to require the bz2 part.
I sound like an idiot. Okay. Last time.
BZ2 files go on the Web Server, Lua file goes on the Game Server, telling clients to download the bz2 files from the Web Server. Is this correct?
.bz2 files should only be in the web server. The source engine redirects the clients to the web server to these files and does the rest.
[QUOTE=HighdefGE;33379799].bz2 files should only be in the web server. The source engine redirects the clients to the web server to these files and does the rest.[/QUOTE]
Hmmm, it stated on the wiki that they needed to be manually sent to the client using resource.AddFile.
Make it easy on yourself, just resource.AddFiles the file's you need WITHOUT BZ2, end of story.
resource.AddFile looks for [b]myfile.vtf.bz2[/b] and then [b]myfile.vtf[/b], if you add [b]myfile.vtf.bz2[/b] then it will try to download [b]myfile.vtf.bz2.bz2[/b] and then [b]myfile.vtf.bz2[/b], it's pointless and would actually take longer
Alright, thanks. :dance:
Sorry, you need to Log In to post a reply to this thread.