resource.AddFile with .bz2

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?

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.

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 myfile.vtf.bz2 and then myfile.vtf, if you add myfile.vtf.bz2 then it will try to download myfile.vtf.bz2.bz2 and then myfile.vtf.bz2, it’s pointless and would actually take longer

Alright, thanks. :dance: