summaryrefslogtreecommitdiff
path: root/Source/Core/DiscIO/CompressedBlob.cpp
AgeCommit message (Collapse)Author
2026-01-25Remove unused importsMartino Fontana
Yellow squiggly lines begone! Done automatically on .cpp files through `run-clang-tidy`, with manual corrections to the mistakes. If an import is directly used, but is technically unnecessary since it's recursively imported by something else, it is *not* removed. The tool doesn't touch .h files, so I did some of them by hand while fixing errors due to old recursive imports. Not everything is removed, but the cleanup should be substantial enough. Because this done on Linux, code that isn't used on it is mostly untouched. (Hopefully no open PR is depending on these imports...)
2026-01-17Common: Replace Result with C++23's std::expected.Jordan Woyak
2025-11-09DiscIO: Make all BlobReader implementations use DirectIOFile to make ↵Jordan Woyak
CopyReader functionality thread safe.
2025-05-07Merge pull request #13542 from ↵Jordan Woyak
tygyh/DiscIO-Pass-parameters-by-constant-reference DiscIO: Pass parameters by constant reference
2025-04-20DiscIO: Pass parameters by constant referenceDr. Dystopia
2025-04-19DiscIO: Use `= default` to define a trivial destructorDr. Dystopia
2024-10-07Simplify `std::copy` with `std::copy_n`mitaclaw
+ a surprise `std::memcpy` in VolumeVerifier.cpp.
2024-08-20Remove redundant semicolonsDr. Dystopia
2023-10-01Added CopyReader to BlobReader and all subclassesLillyJadeKatrin
A deep-copy method CopyReader has been added to BlobReader (virtual) and all of its subclasses (override). This should create a second BlobReader to open the same set of data but with an independent read pointer so that it doesn't interfere with any reads done on the original Reader. As part of this, IOFile has added code to create a deep copy IOFile pointer onto the same file, with code based on the platform in question to find the file ID from the file pointer and open a new one. There has also been a small piece added to FileInfo to enable a deep copy, but its only subclass at this time already had a copy constructor so this was relatively minor.
2022-08-04DiscIO: Replace IsDataSizeAccurate with GetDataSizeTypeJosJuice
Previously, we had WBFS and CISO which both returned an upper bound of the size, and other formats which returned an accurate size. But now we also have NFS, which returns a lower bound of the size. To allow VolumeVerifier to make better informed decisions for NFS, let's use an enum instead of a bool for the type of data size a blob has.
2022-01-29IOFile: Rename Clear() to ClearError() for clarity.Admiral H. Curtiss
2022-01-29IOFile: Make origin parameter to Seek() an enum class.Admiral H. Curtiss
2021-12-10Treewide: Adjust order of includesPokechu22
2021-10-13Fix all uninitialized variable warnings (C26495)Pokechu22
2021-07-05treewide: convert GPLv2+ license info to SPDX tagsPierre Bourdon
SPDX standardizes how source code conveys its copyright and licensing information. See https://spdx.github.io/spdx-spec/1-rationale/ . SPDX tags are adopted in many large projects, including things like the Linux kernel.
2021-03-20Avoid using panic alerts in DiscIOJosJuice
Panic alerts in DiscIO can potentially be very annoying since large amounts of them can pop up when loading the game list if you have some particularly weird files in your game list. This was a much bigger problem back in 5.0 with its "Tried to decrypt data from a non-Wii volume" panic alert, but I figured I would take it all the way and remove the remaining panic alerts that can show up when loading the game list. I have exempted uses of ASSERT/ASSERT_MSG since they indicate a bug in Dolphin rather than a malformed file.
2021-01-27rename Common/File to Common/IOFileShawn Hoffman
2020-11-16Use positional arguments in all translatable fmt stringsJosJuice
We want to use positional arguments in translatable strings that have more than one argument so that translators can change the order of them, but the question is: Should we also use positional arguments in translatable strings with only one argument? I think it makes most sense that way, partially so that translators don't even have to be aware of the non-positional syntax and partially because "translatable strings use positional arguments" is an easier rule for us to remember than "transitional strings which have more than one argument use positional arguments". But let me know if you have a different opinion.
2020-11-11DiscIO: Make use of fmt-capable panic alertsLioncash
Migrates the DiscIO code over to fmt.
2020-10-22DiscIO: Migrate logging over to fmtLioncash
Eliminates quite a bit of the PRI* macros used for handling 64-bit values.
2020-10-19Add helper function for fmt::format(GetStringT(...JosJuice
2020-10-19DiscIO: Make use of fmt where applicableJosJuice
Once nice benefit of fmt is that we can use positional arguments in localizable strings. This a feature which has been requested for the Korean translation of strings like "Errors were found in %zu blocks in the %s partition." and which will no doubt be useful for other languages too.
2020-09-16DiscIO: Use std::function for compression callbackJosJuice
2020-05-06DiscIO: Implement multithreaded compressionJosJuice
2020-04-24DiscIO: Move scrubbing code out of ConvertToGCZJosJuice
This way, scrubbing can also be performed when converting to other formats.
2020-04-24Move DiscIO::ConvertToPlain to FileBlob.cppJosJuice
There is no longer anything GCZ specific about it.
2020-04-24DiscIO: Allow converting from formats other than ISO and GCZJosJuice
The constant DESIRED_BUFFER_SIZE was determined by multiplying the old hardcoded value 32 with the default GCZ block size 16 KiB. Not sure if it actually is the best value, but it seems fine.
2020-04-15DiscIO: Clean up decompression size calculationJosJuice
We can use subtraction and std::min instead of modulo and explicit if statements. This commit does not change the behavior.
2020-04-12DiscIO: Fix decompressing writing too much sometimesJosJuice
This issue cannot happen with good dumps due to their size, but it can happen with trimmed dumps.
2020-04-12DiscIO: Fix decompressing writing too little sometimesJosJuice
This issue cannot happen with good dumps due to their size, but it can happen with trimmed dumps.
2019-07-18DiscIO: Add functions CreateDisc and CreateWADJosJuice
...in addition to the existing function CreateVolume (renamed from CreateVolumeFromFilename). Lets code easily add constraints such as not letting the user select a WAD file when using the disc changing functionality.
2019-06-19Common/MsgHandler: Namespace code within the Common namespaceLioncash
Closes another gap in the Common library where code isn't being namespaced under it.
2019-05-06Reformat repo to clang-format 7.0 rulesTechjar
2019-04-09VolumeVerifier: Check whether invalid blocks are unusedJosJuice
2018-05-16Common/Hash: Namespace code under the Common namespaceLioncash
Brings more common code under the Common namespace.
2017-06-15Move IOFile to a separate fileJosJuice
Reduces the number of files that need to be recompiled when making changes to FileUtil.h.
2017-06-05Fix minor formatting issuesLéo Lam
These were not caught by the lint script while it was broken.
2017-01-21CompressFileToBlob: add an explicit seek to make sure we're at the startBhaaL
2017-01-21DecompressFileToBlob: don't assume success if decompression failedBhaaL
2017-01-21IsGCZBlob: try to leave the file position where it was beforeBhaaL
callers that don't seek afterwards might be missing a few bytes that way.
2017-01-11Don't create new IOFiles when creating a blobJosJuice
...except for WBFS, which is special because it has the ability to open multiple files.
2017-01-11Only open file once when detecting blob typeJosJuice
2017-01-04DiscScrubber: Convert into a classLioncash
Allows potential multiple scrubbers to run at once. Also gets rid of the need to explicitly clean up resources.
2016-06-24Reformat all the things. Have fun with merge conflicts.Pierre Bourdon
2016-04-26DriveReader: Fix View > Show DrivesEmptyChaos
DriveReader::m_size was never initialized which was indirectly causing CGameListCtrl to crash Dolphin when it tried to insert a character at a negative index in a string. Reading one sector at a time is very inefficient and appears to be causing timing issues during boot so SectorReader has been enhanced to support batching. SectorReader has been given a working cache system.
2015-12-15Merge pull request #3270 from JosJuice/more-translationsMarkus Wick
Mark more strings for translation
2015-12-08DiscIO: Get rid of a few explicit deletesLioncash
2015-12-07DiscIO: Make factory methods return unique_ptrsLioncash
Rather than rely on the developer to do the right thing, just make the default behavior safely deallocate resources. If shared semantics are ever needed in the future, the constructor that takes a unique_ptr for shared_ptr can be used.
2015-11-20Mark more strings for translationJosJuice
2015-09-27Merge pull request #3092 from JosJuice/compressed-blobsflacs
Display all compressed formats in blue in GUI