Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Systems Programming with C# and .NET
  • Table Of Contents Toc
Systems Programming with C# and .NET

Systems Programming with C# and .NET

By : Dennis Vroegop
5 (3)
close
close
Systems Programming with C# and .NET

Systems Programming with C# and .NET

5 (3)
By: Dennis Vroegop

Overview of this book

If you want to explore the vast potential of C# and .NET to build high-performance applications, then this book is for you. Written by a 17-time awardee of the Microsoft MVP award, this book delves into low-level programming with C# and .NET. The book starts by introducing fundamental concepts such as low-level APIs, memory management, and performance optimization. Each chapter imparts practical skills, guiding you through threads, file I/O, and network protocols. With a focus on real-world applications, you’ll learn how to secure systems, implement effective logging, and deploy applications seamlessly. The book particularly emphasizes debugging, profiling, and addressing challenges unique to multithreaded and asynchronous code. You’ll also gain insights into cybersecurity essentials to help you safeguard data and establish secure communications. Moreover, a dedicated chapter on systems programming in Linux will help you broaden your horizons and explore cross-platform development. For those venturing into embedded systems, the final chapter offers hands-on guidance. By the end of this book, you’ll be ready to deploy, distribute, and maintain applications in production systems.
Table of Contents (18 chapters)
close
close

File compression

Files can get quite large. As we have already discussed, file IO and network IO take a long time, especially compared to CPUs’ speeds. Anything we can do to minimize the time it takes to read from or write to IO could be worth it. This is even true if it means that we must make the CPU do a lot more. Of course, you need to measure this and see whether that also applies in your situation, but sometimes, sacrificing CPU time to speed up IO can make a huge difference.

One of the ways to do this is by limiting the amount of data we write in a file or a network stream. That can be done using compression.

In the CLR, you have a choice. You can use DeflateStream or GZipStream to do this. GZipStream uses DeflateStream internally, so DeflateStream is obviously faster. GZipStream, however, produces compressed files that can be read by external software. GZip is a standardized compression algorithm.

Compressing some data

Let’s compress a string using...

CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Systems Programming with C# and .NET
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist download Download options font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon