File indexing completed on 2024-12-08 04:17:52
0001 /* 0002 SPDX-FileCopyrightText: 2020 Volker Krause <vkrause@kde.org> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #ifndef KGRAPHQLMINIMIZER_H 0008 #define KGRAPHQLMINIMIZER_H 0009 0010 #include <QByteArray> 0011 0012 /** 0013 * GraphQL query string minimizer 0014 * @internal 0015 */ 0016 class KGraphQLMinimizer 0017 { 0018 public: 0019 explicit KGraphQLMinimizer(); 0020 ~KGraphQLMinimizer(); 0021 0022 QByteArray minimizeQuery(const QByteArray &query); 0023 0024 private: 0025 void appendSpaceCompress(char c); 0026 bool isPunctuator(char c) const; 0027 0028 QByteArray m_out; 0029 }; 0030 0031 #endif // KGRAPHQLMINIMIZER_H