[SOLVED] What is a BLAT file (.blat extension)?

Issue

I am building a Blazor WASM application and noticed a file with a ".blat" extension (dotnet.timezones.blat). The file is readable in a text editor and contains coded timezones and geographic information. I can infer the purpose of the file but am wondering what the meaning of BLAT is in this context. I have searched online and have only been able to learn that it is a new extension in .NET 5.0+. Any insights?

(Note: I am assuming it is unrelated to the email console utility.)

Solution

From what I can see, blat is a format specifically made for blazor. My guess as to the naming is it stands for BLAzor Time zones. As far as the file format, it contains timezone data read from tz database.
You could think of it like a tar file, a bunch of tz files packaged together for distribution.
Here is an old repository showing the creation of the file. (The file extension changed from dat to blat, so the current format is probably different.)

However, from what I can see, currently the blat file is now loaded into the mono runtime from the blazor side as a resource.

Here is the code on the mono side.

Here is the calling code on the blazor side.

Currently blazor uses ICU under the hood, I heard they are considering other options though to try get the binary size down in the future.

Answered By – Jesse Good

Answer Checked By – David Goodson (BugsFixing Volunteer)

Leave a Reply

Your email address will not be published. Required fields are marked *