Have an amazing solution built in RAD Studio? Let us know. Looking for discounts? Visit our Special Offers page!
C++Case StudyShowcase

C++Builder Is The Choice For The Award-Winning FileOptimizer

C++ Builder Is The Choice For The Award Winning FileOptimizer

Today’s article is from C++ developer Javier Gutiérrez Chamorro. Javier is a very enthusiastic long-term C++Builder developer who has won multiple awards for his FileOptimizer C++ app. Here he tells us why he continues to choose C++Builder as his C++ IDE and the story behind his success.

Who is Javier Gutiérrez Chamorro and what is FileOptimizer?

C++ Builder Is The Choice For The Award Winning FileOptimizer the GPL screen for FileOptimizer

Javier Gutiérrez Chamorro here, the founder and main developer of the award-winning FileOptimizer tool. This is not something I say but supported by third party entities such as Sourceforge who awarded it for several times as project of the week and the month, and of course, Embarcadero, who recognized it in the “Building Good with C++Builder Contest 2021”.

In order to understand the context, first things first. I am a professionally involved in technology since almost 25 years ago, but not Delphi nor C++Builder related for almost a decade. I am in the industry of Javascript, HTML, PHP, and the tons of libraries, frameworks and tool chains. As it happens usually, during my workdays I have a need, a program that allowed me to easily optimize the images that would be loaded in websites and iOS applications in order to reduce its size, and thus improve the loading and rendering speed.

FileOptimizer is essentially a GUI (Graphics User Interface) frontend to powerful, but hard to use command line tools that perform the hard job, the lossless compression of files. No matter if you are referring to a PNG image, MP4 video, PDF leaflet or a Word document, FileOptimizer will recognize it and pass the action to the appropriate plugin in order to optimize it. What is the point? Well, you will get files that look exactly the same as the original, that use exactly the same format and can be opened by same original tools, but they will be smaller.

What was the development process behind FileOptimizer?

Small files were a key point back in the 1980s when memory and disk storage was scares. Nowadays with gigabytes of RAM and terabytes of disk it could sound as something of the past, but it is not. Lots of devices have limited hardware capabilities (smartphones, tablets, …) and you want to extract the most of them; and in other cases, bandwidth is a constraint. Bandwidth is expensive, and I am sure all of you will prefer to place a 100 K image on your website as opposite to the same image weighting 1000 K. I know you have modern formats reduce file size as we compare them to existing ones, just take a look at H265 for videos or WebP for images. Unfortunately those new formats require new tools too. New programs to edit or convert them, new apps to view them… So the need of reducing the size of a file, but keeping the original format is still there.

C++ Builder Is The Choice For The Award Winning FileOptimizer the C++ Builder screen

What operating system do you use?

I have been always based in Windows platform, well at least after DOS and the good old days of Turbo Pascal and Turbo C++ eclipsed. I truly believe in the advantages of native applications, compact binaries and fast execution speed. The old school philosophy of getting the most of the bare metal. When I started FileOptimizer in 2012 there were not so many alternatives, so going with Delphi or C++Builder was clear. Personally I always felt more comfortable with C++ than Object Pascal: more powerful low level coding if needed, enhanced runtime performance, and specially its capability to develop either near to the hardware, or at a higher level thanks to VCL encapsulation.

Have you always used C++Builder, if so, why?

Honestly I have been using C++Builder since its launch with version 1.0, both for hobby and professional developments. I like a lot its approach of having a true RAD environment with the power of C++, something that Visual C++ have not achieved yet, same as Power++/Optima++ did not in the past. My choice was clear, I would go for Embarcadero C++Builder.

The magic of a Rapid Application Development allowed me having an early prototype in just few days. Of course, as the time passed, and since them I have release more than 50 versions of FileOptimizer, more and more features were added, but the important thing is that I was able to get a minimum viable product in a record time.

The experience always teaches you, at least if you want to learn. What I learned is to reduce the dependencies to the minimum. Previous works such as XPlorer used lots third-party components, a clear advantage to avoid reinventing the wheel, but sometimes a problem when you want to support a new OS or upgrade your C++Builder. This is the reason why FileOptimizer relies on vanilla VCL components and in the Windows API.

Was C++Builder a good choice?

Time confirmed it was a good decision, according to the changelog I started FileOptimizer with C++Builder XE2, and now it is on C++Builder 11.2, and tested with the Malawi Beta. A decade of history is a lot in the life of software, easily to become obsolete, useless or superseded; and C++Builder version after version, and Windows version after version, I was able to update it, and also take advantage of some new features that arise: TaskDialogs in Windows Vista, Wine compatibility on Linux – everything without breaking backwards compatibility thanks to dynamically loading libraries.

C++ Builder Is The Choice For The Award Winning FileOptimizer FileOptimizer in action

Why do you use C++ for FileOptimizer?

While C++ is an efficient programming language, C++Builder is a productive environment for it. Easy tune and debug with its integrated debugger, fast coding with CodeInsight, powerful editor, and an amazing visual designer that allows you to create complex layouts without writing any line of code.

Nevertheless, new features exponentially growth the codebase, and increased its complexity, at about 10,000 LOC (lines of code), everything on par with the more than 400 file extensions that are supported, needing to handle more than 100 command-line plugins each one with its own syntax.

In current times when everything is smart, FileOptimizer is too, being able to detect filetypes by analyzing its contents, and do not relying in its file extension. On the user perspective this means that if a GIF image is stored as Myimage.file, the logic in FileOptimizer will transparently determine it is a GIF. On the coding side, the detection engine uses magic bytes in headers for most common files, thanks to the capabilities of C++ to deal with bytes and memory blocks, in fact, the key design aspects that were in place when designing C and C++.

C++ Builder Is The Choice For The Award Winning FileOptimizer the FileOptimizer options screen

What lessons have you learned from the success of FileOptimizer?

I highly doubt the success and the longevity of FileOptimizer could be possible without C++Builder. First of all, we have the continued evolution of C++ and Embarcadero’s C++ Builder, just imagine it were created in “classic” Visual Basic 6, a tool without real support nor compatibility since years ago.

Second argument would the maturity, C++Builder is a stable solution with a well know and documented paradigm that makes it fast to learn, and easy to master.

Finally, even if less common nowadays, we have its compatibility and performance. A tool that is capable to work even in a Windows XP machine with 256 MB of memory, but that will extract all the power on a last generation Windows 11 box with 64 GB of memory.

You can find FileOptimizer at SourceForge: https://nikkhokkho.sourceforge.io/static.php?page=FileOptimizer

This article was submitted as part of our Enterprise Article Showcase. If you have a success story to tell about a project which makes use of RAD Studio with Delphi or C++ Builder, or any of our other great enterprise products please get in touch, you could be featured too and win a prize! Read all about it here: Enterprise Article Showcase

Reduce development time and get to market faster with RAD Studio, Delphi, or C++Builder.
Design. Code. Compile. Deploy.
Start Free Trial   Upgrade Today

   Free Delphi Community Edition   Free C++Builder Community Edition

About author

Ian is the Embarcadero Developer Advocate, a professional writer, presenter, and host. He is a prolific software developer, voice actor, designer and poet. Ian is British American, born in London, now living in Dallas, Texas. "I get up early every day and write code".

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.