serenity/AK
Timothy Flynn 81ad6de41b AK: Avoid creating an intermediate buffer when decoding a Base64 string
There's no need to copy the result. We can also avoid increasing the
size of the output buffer by 1 for each written byte.

This reduces the runtime of `./bin/base64 -d enwik8.base64 >/dev/null`
from 0.917s to 0.632s.

(enwik8 is a 100MB test file from http://mattmahoney.net/dc/enwik8.zip)
2024-03-21 15:53:46 +01:00
..
.clang-tidy
AllOf.h
AnyOf.h
ArbitrarySizedEnum.h
Array.h AK: Add to_array() 2024-02-11 18:53:00 +01:00
Assertions.cpp
Assertions.h Everywhere: Prefer VERIFY over assert() 2024-02-05 07:03:53 -05:00
Atomic.h
AtomicRefCounted.h
Badge.h
Base64.cpp AK: Avoid creating an intermediate buffer when decoding a Base64 string 2024-03-21 15:53:46 +01:00
Base64.h AK: Add base64url encoding and decoding methods 2024-03-20 12:18:57 -04:00
BigIntBase.h
BinaryBufferWriter.h
BinaryHeap.h AK: Introduce IntrusiveBinaryHeap and reimplement BinaryHeap using it 2024-02-25 17:24:36 -07:00
BinarySearch.h
BitCast.h
Bitmap.h
BitmapView.h
BitStream.h AK: Add BigEndianInputBitStream::bits_until_next_byte_boundary() 2024-02-12 14:08:56 +01:00
BufferedStream.h AK: Allow reading from EOF buffered streams better in read_line() 2024-02-26 13:16:27 -07:00
BuiltinWrappers.h
BumpAllocator.h
ByteBuffer.h AK: Add an option to zero-fill ByteBuffer data upon growth 2023-12-27 19:30:39 +01:00
ByteReader.h
ByteString.cpp AK+LibJS: Remove null state from DeprecatedFlyString :^) 2024-02-24 15:06:52 -07:00
ByteString.h AK+LibJS: Remove null state from DeprecatedFlyString :^) 2024-02-24 15:06:52 -07:00
CharacterTypes.h AK: Add is_ascii_uppercase_hex_digit() 2024-03-01 14:17:42 +01:00
Checked.h AK: Use fallback builtins for overflow checks in AK::Checked 2023-12-21 15:31:32 +01:00
CheckedFormatString.h
CircularBuffer.cpp
CircularBuffer.h
CircularDeque.h
CircularQueue.h
CMakeLists.txt AK+LibURL: Move AK::URL into a new URL library 2024-03-18 14:06:28 -04:00
Complex.h AK: Cover TestComplex with more tests 2024-01-12 16:42:51 -07:00
Concepts.h
ConstrainedStream.cpp
ConstrainedStream.h
CountingStream.cpp
CountingStream.h
COWVector.h AK+LibRegex+LibWasm: Remove the non-const COWVector::operator[] 2024-03-12 17:10:47 +01:00
DateConstants.h
Debug.h.in LibGfx: Add the start of a JBIG2 loader 2024-03-09 16:01:22 +01:00
DefaultDelete.h
Demangle.h Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
DeprecatedFlyString.cpp AK+LibJS: Remove null state from DeprecatedFlyString :^) 2024-02-24 15:06:52 -07:00
DeprecatedFlyString.h AK+LibJS: Remove null state from DeprecatedFlyString :^) 2024-02-24 15:06:52 -07:00
Diagnostics.h
DisjointChunks.h
DistinctNumeric.h
DOSPackedTime.cpp
DOSPackedTime.h
DoublyLinkedList.h
Endian.h ntpquery: Use AK::convert_between_host_and_network_endian 2024-02-06 04:37:47 -07:00
EnumBits.h
Error.cpp
Error.h Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
Find.h
FixedArray.h
FixedPoint.h
FixedStringBuffer.h
FloatingPoint.h AK: Make IndexSequence use size_t 2024-02-11 18:53:00 +01:00
FloatingPointStringConversions.cpp
FloatingPointStringConversions.h
FlyString.cpp AK: Make FlyString-to-FlyString comparison inline & trivial 2024-03-14 12:42:08 +01:00
FlyString.h AK: Make FlyString-to-FlyString comparison inline & trivial 2024-03-14 12:42:08 +01:00
Format.cpp AK: Make the :hex-dump format specifier print all characters 2024-01-21 21:13:58 +01:00
Format.h Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
Forward.h AK+LibURL: Move AK::URL into a new URL library 2024-03-18 14:06:28 -04:00
FPControl.h
Function.h
FuzzyMatch.cpp
FuzzyMatch.h
GenericLexer.cpp AK+LibXML+JSSpecCompiler: Move LineTrackingLexer to AK 2024-02-16 15:26:43 +01:00
GenericLexer.h AK+LibXML+JSSpecCompiler: Move LineTrackingLexer to AK 2024-02-16 15:26:43 +01:00
GenericShorthands.h
HashFunctions.h
HashMap.h AK: Early return from empty hash table lookups to avoid hashing 2024-03-16 14:27:59 +01:00
HashTable.h AK: Early return from empty hash table lookups to avoid hashing 2024-03-16 14:27:59 +01:00
Hex.cpp Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
Hex.h Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
IDAllocator.h
InsertionSort.h
IntegralMath.h
IntrusiveDetails.h
IntrusiveList.h
IntrusiveListRelaxedConst.h
IntrusiveRedBlackTree.h
IPv4Address.h Everywhere: Use to_number<T> instead of to_{int,uint,float,double} 2023-12-23 20:41:07 +01:00
IPv6Address.h
IterationDecision.h
Iterator.h Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
JsonArray.h Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
JsonArraySerializer.h Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
JsonObject.cpp AK+Everywhere: Remove JsonValue APIs with implicit default values 2024-01-21 15:47:53 -07:00
JsonObject.h AK: Store JsonValue's value in AK::Variant 2024-02-08 08:04:05 -07:00
JsonObjectSerializer.h Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
JsonParser.cpp AK: Remove ByteString from GenericLexer 2024-01-12 17:03:53 -07:00
JsonParser.h Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
JsonPath.cpp Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
JsonPath.h Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
JsonValue.cpp AK: Store JsonValue's value in AK::Variant 2024-02-08 08:04:05 -07:00
JsonValue.h AK: Store JsonValue's value in AK::Variant 2024-02-08 08:04:05 -07:00
kmalloc.cpp
kmalloc.h
kstdio.h
LEB128.h
LexicalPath.cpp Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
LexicalPath.h Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
MACAddress.h Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
Math.h AK: Remove rsqrt() 2024-01-30 10:02:33 +01:00
MaybeOwned.h
MemMem.h
Memory.h
MemoryStream.cpp
MemoryStream.h
NeverDestroyed.h
NoAllocationGuard.h
Noncopyable.h AK: Add AK_MAKE_DEFAULT_COPYABLE 2024-01-21 16:16:15 -07:00
NonnullOwnPtr.h
NonnullRefPtr.h
NumberFormat.cpp AK+Userland: Return String from human_readable_size() functions 2024-01-25 09:07:32 +01:00
NumberFormat.h AK+Userland: Return String from human_readable_size() functions 2024-01-25 09:07:32 +01:00
NumericLimits.h
Optional.h AK+LibJS: Remove OFFSET_OF and its users 2024-02-29 09:00:00 +01:00
OptionParser.cpp AK: Update OptionParser::m_arg_index by substracting skipped args 2024-02-06 00:08:30 +01:00
OptionParser.h
OwnPtr.h
Platform.h AK+Lagom: Make it possible to build for iOS 2024-03-03 13:13:42 -07:00
PrintfImplementation.h
Ptr32.h
Queue.h
QuickSelect.h
QuickSort.h
Random.cpp LibTest: Add more numeric generators 2024-01-12 16:42:51 -07:00
Random.h LibTest: Add more numeric generators 2024-01-12 16:42:51 -07:00
RecursionDecision.h
RedBlackTree.h
RefCounted.h
RefCountForwarder.h
RefPtr.h
Result.h
ReverseIterator.h Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
ScopedValueRollback.h
ScopeGuard.h
ScopeLogger.h Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
SegmentedVector.h AK+LibWeb: Use segmented vector to store commands in RecordingPainter 2023-12-30 23:02:46 +01:00
SIMD.h
SIMDExtras.h
SIMDMath.h AK: Remove the SIMD version of rsqrt() too, for good measure 2024-01-30 10:02:33 +01:00
Singleton.h
SinglyLinkedList.h
SinglyLinkedListSizePolicy.h
SipHash.cpp
SipHash.h
Slugify.cpp
Slugify.h
SourceGenerator.h Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
SourceLocation.h
Span.h AK: Generalize Span::contains_slow to use the Traits infrastructure 2024-03-16 08:42:33 +01:00
Stack.h
StackInfo.cpp AK+Lagom: Make it possible to build for iOS 2024-03-03 13:13:42 -07:00
StackInfo.h
Statistics.h
StdLibExtraDetails.h LibCrypto: Add a minimal DER encoder 2024-03-16 01:17:02 -06:00
StdLibExtras.h AK+LibJS: Remove OFFSET_OF and its users 2024-02-29 09:00:00 +01:00
Stream.cpp
Stream.h
String.cpp AK: Remove StringInternals.h 2024-01-21 16:16:15 -07:00
String.h AK: Store data in FlyString as StringBase 2024-01-21 16:16:15 -07:00
StringBase.cpp AK: Remove StringInternals.h 2024-01-21 16:16:15 -07:00
StringBase.h AK: Make FlyString-to-FlyString comparison inline & trivial 2024-03-14 12:42:08 +01:00
StringBuilder.cpp AK: Implement StringBuilder::append_code_point() more efficiently 2023-12-30 13:49:50 +01:00
StringBuilder.h LibTextCodec+AK: Don't validate UTF-8 strings twice 2023-12-30 13:49:50 +01:00
StringFloatingPointConversions.cpp
StringFloatingPointConversions.h
StringHash.h
StringImpl.cpp
StringImpl.h
StringUtils.cpp AK: Improve performance of StringUtils::find_last 2024-01-04 11:28:03 -05:00
StringUtils.h Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
StringView.cpp AK: Add a StringView method to count the number of lines in a string 2024-03-08 14:43:33 -05:00
StringView.h AK: Add a StringView method to count the number of lines in a string 2024-03-08 14:43:33 -05:00
TemporaryChange.h
Time.cpp
Time.h
Traits.h
Trie.h
Try.h
Tuple.h AK: Make IndexSequence use size_t 2024-02-11 18:53:00 +01:00
TypeCasts.h
TypedTransfer.h
TypeList.h AK: Make IndexSequence use size_t 2024-02-11 18:53:00 +01:00
Types.h AK: Make IndexSequence use size_t 2024-02-11 18:53:00 +01:00
UBSanitizer.h
UFixedBigInt.h
UFixedBigIntDivision.h
UnicodeUtils.h AK: Stop using ShortString in String::from_code_point 2024-01-21 16:16:15 -07:00
Userspace.h
Utf8View.cpp AK: Add ASCII fast path to Utf8CodePointIterator 2023-12-30 13:49:50 +01:00
Utf8View.h Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
Utf16View.cpp AK: Add a Utf16View::starts_with method 2024-01-04 12:43:10 +01:00
Utf16View.h AK: Add a Utf16View::starts_with method 2024-01-04 12:43:10 +01:00
Utf32View.cpp
Utf32View.h
UUID.cpp
UUID.h
Variant.h AK: Make IndexSequence use size_t 2024-02-11 18:53:00 +01:00
Vector.h AK+LibJS: Remove OFFSET_OF and its users 2024-02-29 09:00:00 +01:00
Weakable.h AK+LibJS: Remove OFFSET_OF and its users 2024-02-29 09:00:00 +01:00
WeakPtr.h