Anteru's blog
  • Consulting
  • Research
    • Assisted environment probe placement
    • Assisted texture assignment
    • Edge-Friend: Fast and Deterministic Catmull-Clark Subdivision Surfaces
    • Error Metrics for Smart Image Refinement
    • High-Quality Shadows for Streaming Terrain Rendering
    • Hybrid Sample-based Surface Rendering
    • Interactive rendering of Giga-Particle Fluid Simulations
    • Quantitative Analysis of Voxel Raytracing Acceleration Structures
    • Real-time Hybrid Hair Rendering
    • Real-Time Procedural Generation with GPU Work Graphs
    • Scalable rendering for very large meshes
    • Spatiotemporal Variance-Guided Filtering for Motion Blur
    • Subpixel Reconstruction Antialiasing
    • Tiled light trees
    • Towards Practical Meshlet Compression
  • About
  • Archive

File system thoughts

March 13, 2006
  • Programming
approximately 1 minutes to read

I’ve been working today morning on the file system (today afternoon I’m going to install my new Asus K8N-SLI Premium ;) mobo so my desktop PC will be running again). I’ve added some generic stream classes: IStream, MemoryStream, TextStream and IFile. Some of them depend on each other, MemoryStreams can be streamed into IFiles, the same is true for the TextStreams. The log uses now the TextStream which means that is basically stores a TextStream and the output file and redirects all incoming data to the TextStream with a bit of formatting (log prepends the current timestamp). This approach has some nice advantages as for example MemoryArchive can wrap around a MemoryStream and does not need to fall back to the C++ I/O streams internally. MemoryArchive provides some serialization functions for primitive data types and hides a bit of MemoryStream’s functions (namely, the raw read/write functions, and the seek function). Another nice thing is that MemoryArchive can stream into any kind of stream now, including MemoryStream - which means you can do deep copies “for free” without additional work. Code like this is enough:

MemoryArchive::operator=(MemoryArchive& rhs)
{
    MemoryStream stream;
    streamTo (&stream);
    rhs.streamFrom (&stream);
}

So much for now, I’ll post a few more details when the refactoring/rewrite is over.

Previous post
Next post

Recent posts

  • Data formats: Why CSV and JSON aren't the best
    Posted on 2024-12-29
  • Replacing cron with systemd-timers
    Posted on 2024-04-21
  • Open Source Maintenance
    Posted on 2024-04-02
  • Angular, Caddy, Gunicorn and Django
    Posted on 2023-10-21
  • Effective meetings
    Posted on 2022-09-12
  • Older posts

Find me on the web

  • GitHub
  • GPU database
  • Projects

Follow me

Anteru NIV_Anteru
Contents © 2005-2025
Anteru
Imprint/Impressum
Privacy policy/Datenschutz
Made with Liara
Last updated February 03, 2019