# New class for ZIP handling (TCastleZip), progress on new pretty wireframe approach, WOFF fonts support, LOD usage demo

**URL:** https://forum.castle-engine.io/t/new-class-for-zip-handling-tcastlezip-progress-on-new-pretty-wireframe-approach-woff-fonts-support-lod-usage-demo/1814
**Category:** News
**Created:** [March 9, 2025, 2:03pm UTC](https://forum.castle-engine.io/t/new-class-for-zip-handling-tcastlezip-progress-on-new-pretty-wireframe-approach-woff-fonts-support-lod-usage-demo/1814 "2025-03-09T14:03:32Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![michalis](https://forum.castle-engine.io/user_avatar/forum.castle-engine.io/michalis/32/3_2.png) [@michalis](https://forum.castle-engine.io/u/michalis)
#### Post date: [March 9, 2025, 2:03pm UTC](https://forum.castle-engine.io/t/new-class-for-zip-handling-tcastlezip-progress-on-new-pretty-wireframe-approach-woff-fonts-support-lod-usage-demo/1814/1 "2025-03-09T14:03:32Z")

</div>

| [![LOD example](https://forum.castle-engine.io/uploads/default/original/2X/8/885fef7ed1d2051126c38d8485998ee3d7b62d3e.png)](https://castle-engine.io/wp/wp-content/uploads/2025/03/lod_example.png "LOD example") |
| [![Wireframe tests](https://forum.castle-engine.io/uploads/default/original/2X/e/ef032dd0a35ade559939f66b5f0119439ba78e2e.png)](https://castle-engine.io/wp/wp-content/uploads/2025/03/shading_wireframe.png "Wireframe tests") |

Announcing a number of engine improvements from the last weeks:

1. We have a new class for ZIP handling: `TCastleZip`. Features:
  - Reading ZIP files from any `TStream` or URL (see [networking](https://castle-engine.io/manual_network.php) about our URL support). Just open ZIP by `TCastleZip.Open` and read by `TCastleZip.Read`.

  - Create and write ZIP files. Again, with API consistent with our engine, supporting URLs and so on. Just open ZIP by `TCastleZip.OpenEmpty` and write by `TCastleZip.Write`.

  - Optionally register a URL handler, to read or write files inside a ZIP archive by just accesing URL with the given prefix. See `TCastleZip.RegisterUrlProtocol` for an example. Very comfortable to use ZIP throughout our engine. E.g. you can open `TCastleScene` using an URL that points to a ZIP file, and relative URLs in the scene (e.g. texture names from a 3D format like glTF or X3D) will be automatically resolved to files inside the ZIP archive. Everything else in our engine also in effect supports ZIP, e.g. you can use `FileToString` or `` to access ZIP files as well.

  - Works with both FPC and Delphi.

  - Has been tested on really wild examples, to make sure it supports out-of-the-box also files with non-ASCII characters (spaces, Polish characters) with all compilers, for both reading and writing. You can see some of the testcases it passes in [tests/code/testcases/testcastlezip.pas](https://github.com/castle-engine/castle-engine/blob/master/tests/code/testcases/testcastlezip.pas) and [tools/build-tool/tests/testtoolutils.pas](https://github.com/castle-engine/castle-engine/blob/master/tools/build-tool/tests/testtoolutils.pas).

  - Used also internally in our engine, so it’s really well-tested, we rely on the API being functional and implementation being correct. Our [build tool](https://castle-engine.io/build_tool) uses it, for both packaging [web data to zip](https://castle-engine.io/web), and for packing whole application release to zip. Web target also uses it at run-time to read data — `castle-data:/` URLs are resolved to a ZIP file that holds your data on the web, by default.

2. Using `TAbstractShapeNode.Shading` with `shWireframe` value in Pascal (or [shading=”WIREFRAME” in X3D](https://castle-engine.io/x3d_implementation_shape_extensions.php#section_ext_shading)) is now supported for all geometry node types.

3. We have added a new simple example [examples/viewport\_and\_scenes/level\_of\_detail\_demo](https://github.com/castle-engine/castle-engine/tree/master/examples/viewport_and_scenes/level_of_detail_demo) showing how to setup LOD (level of detail) for your 3D models. This is a simple way to optimize rendering, by using simpler geometry for objects that are far away from the camera.

4. We support WOFF fonts throughout the engine. Our underlying [FreeType](https://freetype.org/) already supported them, we just enhanced some filters (in dialog boxes) and improved our [documentation](https://castle-engine.io/text) to make it official.

Do you like what we do? Please [support us on Patreon](https://www.patreon.com/castleengine) or [donate](https://castle-engine.io/donate) to keep the engine development going! Thank you!

---

<div class="post-metadata">

### Author: ![michalis](https://forum.castle-engine.io/user_avatar/forum.castle-engine.io/michalis/32/3_2.png) [@michalis](https://forum.castle-engine.io/u/michalis)
#### Post date: [March 9, 2025, 2:05pm UTC](https://forum.castle-engine.io/t/new-class-for-zip-handling-tcastlezip-progress-on-new-pretty-wireframe-approach-woff-fonts-support-lod-usage-demo/1814/2 "2025-03-09T14:05:50Z")

</div>


