text stringlengths 9 39.2M | dir stringlengths 25 226 | lang stringclasses 163
values | created_date timestamp[s] | updated_date timestamp[s] | repo_name stringclasses 751
values | repo_full_name stringclasses 752
values | star int64 1.01k 183k | len_tokens int64 1 18.5M |
|---|---|---|---|---|---|---|---|---|
```c++
/*
*/
#include "DMVersion.h"
namespace ZXing::DataMatrix {
const Version* VersionForDimensions(int height, int width)
{
if ((height & 0x01) != 0 || (width & 0x01) != 0 || height < 8 || height > 144)
return nullptr;
/**
* See ISO 16022:2006 5.5.1 Table 7
* See ISO 21471:2020 (DMRE) 5.5.1 Table 7
*/
st... | /content/code_sandbox/core/src/datamatrix/DMVersion.cpp | c++ | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 1,823 |
```c++
/*
*/
#include "DMDataBlock.h"
#include "DMVersion.h"
#include "ZXAlgorithms.h"
#include <vector>
namespace ZXing::DataMatrix {
std::vector<DataBlock> GetDataBlocks(const ByteArray& rawCodewords, const Version& version, bool fix259)
{
// First count the total number of data blocks
// Now establish DataBlo... | /content/code_sandbox/core/src/datamatrix/DMDataBlock.cpp | c++ | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 632 |
```objective-c
/*
*/
#pragma once
#include "CharacterSet.h"
#include "DMSymbolShape.h"
#include <string>
namespace ZXing {
class BitMatrix;
namespace DataMatrix {
class Writer
{
public:
Writer();
Writer& setMargin(int margin) {
_quietZone = margin;
return *this;
}
Writer& setShapeHint(SymbolShape shape... | /content/code_sandbox/core/src/datamatrix/DMWriter.h | objective-c | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 283 |
```objective-c
/*
*/
#pragma once
namespace ZXing::DataMatrix {
enum class SymbolShape {
NONE,
SQUARE,
RECTANGLE,
};
} // namespace ZXing::DataMatrix
``` | /content/code_sandbox/core/src/datamatrix/DMSymbolShape.h | objective-c | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 38 |
```c++
/*
*/
#include "DMECEncoder.h"
#include "ByteArray.h"
#include "DMSymbolInfo.h"
#include <algorithm>
#include <array>
#include <stdexcept>
#include <string>
namespace ZXing::DataMatrix {
/**
* Precomputed polynomial factors for ECC 200.
*/
static const std::array<ByteArray, 16> FACTORS = {{
/*set 1*/ {228... | /content/code_sandbox/core/src/datamatrix/DMECEncoder.cpp | c++ | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 3,863 |
```objective-c
/*
*/
#pragma once
#include "DMSymbolShape.h"
namespace ZXing::DataMatrix {
class SymbolInfo
{
bool _rectangular;
int _dataCapacity;
int _errorCodewords;
int _matrixWidth;
int _matrixHeight;
int _dataRegions;
int _rsBlockData;
int _rsBlockError;
public:
constexpr SymbolInfo(bool rectangular... | /content/code_sandbox/core/src/datamatrix/DMSymbolInfo.h | objective-c | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 593 |
```objective-c
/*
*/
#pragma once
#include "Reader.h"
namespace ZXing::DataMatrix {
class Reader : public ZXing::Reader
{
public:
using ZXing::Reader::Reader;
Barcode decode(const BinaryBitmap& image) const override;
#ifdef __cpp_impl_coroutine
Barcodes decode(const BinaryBitmap& image, int maxSymbols) const ov... | /content/code_sandbox/core/src/datamatrix/DMReader.h | objective-c | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 86 |
```c++
/*
*/
#include "DMSymbolInfo.h"
#include "ZXAlgorithms.h"
#include "ZXTestSupport.h"
#include <cstddef>
#include <stdexcept>
namespace ZXing::DataMatrix {
static constexpr const SymbolInfo PROD_SYMBOLS[] = {
{ false, 3, 5, 8, 8, 1 },
{ false, 5, 7, 10, 10, 1 },
{ true, 5, 7, 16, 6, 1 },
{ false, 8, 10, ... | /content/code_sandbox/core/src/datamatrix/DMSymbolInfo.cpp | c++ | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 1,300 |
```c++
/*
*/
#include "DMWriter.h"
#include "BitMatrix.h"
#include "ByteArray.h"
#include "CharacterSet.h"
#include "DMBitLayout.h"
#include "DMECEncoder.h"
#include "DMHighLevelEncoder.h"
#include "DMSymbolInfo.h"
#include "Utf.h"
#include <stdexcept>
#include <string>
#include <utility>
namespace ZXing::DataMatri... | /content/code_sandbox/core/src/datamatrix/DMWriter.cpp | c++ | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 910 |
```c++
/*
*/
#include "BitMatrix.h"
#ifdef ZXING_EXPERIMENTAL_API
#include "WriteBarcode.h"
#else
#include "MultiFormatWriter.h"
#endif
#include <vector>
using namespace ZXing;
using namespace std::literals;
#define STB_IMAGE_WRITE_IMPLEMENTATION
#include <stb_image_write.h>
#ifdef ZXING_EXPERIMENTAL_API
void save... | /content/code_sandbox/test/blackbox/TestWriterMain.cpp | c++ | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 524 |
```objective-c
/*
*/
#pragma once
#include "ZXFilesystem.h"
#include <set>
#include <string>
namespace ZXing::Test {
int runBlackBoxTests(const fs::path& blackboxPath, const std::set<std::string>& includedTests);
} // ZXing::Test
``` | /content/code_sandbox/test/blackbox/BlackboxTestRunner.h | objective-c | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 59 |
```c++
/*
*/
#include "BlackboxTestRunner.h"
#include "ImageLoader.h"
#include "ReadBarcode.h"
#include "ZXAlgorithms.h"
#include <cstdlib>
#include <cstring>
#include <fstream>
#include <iostream>
#include <set>
using namespace ZXing;
using namespace ZXing::Test;
int getEnv(const char* name, int fallback = 0)
{
a... | /content/code_sandbox/test/blackbox/TestReaderMain.cpp | c++ | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 472 |
```c++
/*
*/
#include "DMDetector.h"
#include "BitMatrix.h"
#include "BitMatrixCursor.h"
#include "ByteMatrix.h"
#include "DetectorResult.h"
#include "GridSampler.h"
#include "LogMatrix.h"
#include "Point.h"
#include "RegressionLine.h"
#include "ResultPoint.h"
#include "Scope.h"
#include "WhiteRectDetector.h"
#inclu... | /content/code_sandbox/core/src/datamatrix/DMDetector.cpp | c++ | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 9,649 |
```objective-c
/*
*/
#pragma once
#include "ImageView.h"
#include "ZXFilesystem.h"
namespace ZXing::Test::ImageLoader {
void clearCache();
const ImageView& load(const fs::path& imgPath);
} // namespace ZXing::Test::ImageLoader
``` | /content/code_sandbox/test/blackbox/ImageLoader.h | objective-c | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 54 |
```objective-c
/*
*/
#pragma once
#if __has_include(<filesystem>)
# include <filesystem>
# ifdef __cpp_lib_filesystem
namespace fs = std::filesystem;
# endif
#endif
#if !defined(__cpp_lib_filesystem) && __has_include(<experimental/filesystem>)
# include <experimental/filesystem>
# ifdef __cpp_lib_experiment... | /content/code_sandbox/test/blackbox/ZXFilesystem.h | objective-c | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 195 |
```c++
/*
*/
#include "ImageLoader.h"
#include "BinaryBitmap.h"
#include "ImageView.h"
#include <array>
#include <map>
#include <memory>
#include <stdexcept>
#define STB_IMAGE_IMPLEMENTATION
#include <stb_image.h>
namespace ZXing::Test {
class STBImage : public ImageView
{
std::unique_ptr<stbi_uc[], void (*)(voi... | /content/code_sandbox/test/blackbox/ImageLoader.cpp | c++ | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 469 |
```c++
/*
*/
#include "BarcodeFormat.h"
#include "gtest/gtest.h"
#include <stdexcept>
#include <vector>
using namespace ZXing;
TEST(BarcodeFormatTest, BarcodeFormat)
{
using namespace std::literals;
EXPECT_EQ(ToString(BarcodeFormat::QRCode), "QRCode"s);
EXPECT_EQ(ToString(BarcodeFormat::None), "None"s);
EXPECT... | /content/code_sandbox/test/unit/BarcodeFormatTest.cpp | c++ | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 352 |
```c++
/*
*/
#include "Utf.h"
#include "gtest/gtest.h"
using namespace ZXing;
#if __cplusplus > 201703L
std::string EscapeNonGraphical(const char8_t* utf8)
{
return EscapeNonGraphical(reinterpret_cast<const char*>(utf8));
}
#endif
TEST(TextUtfEncodingTest, EscapeNonGraphical)
{
EXPECT_EQ(EscapeNonGraphical(u8"\u... | /content/code_sandbox/test/unit/TextUtfEncodingTest.cpp | c++ | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 525 |
```c++
/*
*/
#include "gtest/gtest.h"
// see path_to_url#sanitizer-integration
extern "C"
{
void __ubsan_on_report() { FAIL() << "Encountered an undefined behavior sanitizer error"; }
void __asan_on_error() { FAIL() << "Encountered an address sanitizer error"; }
void __tsan_on_report() { FAIL() << "Encountered a ... | /content/code_sandbox/test/unit/SanitizerSupport.cpp | c++ | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 94 |
```c++
/*
*/
#include "BlackboxTestRunner.h"
#include "ImageLoader.h"
#include "ReadBarcode.h"
#include "Utf.h"
#include "ZXAlgorithms.h"
#include <fmt/core.h>
#include <fmt/ostream.h>
#include <chrono>
#include <exception>
#include <fstream>
#include <map>
#include <optional>
#include <set>
#include <sstream>
#inc... | /content/code_sandbox/test/blackbox/BlackboxTestRunner.cpp | c++ | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 6,576 |
```c++
/*
*/
#include "GTIN.h"
#include "gtest/gtest.h"
using namespace ZXing;
using namespace ZXing::GTIN;
TEST(GTINTest, CountryIdentifierEAN13)
{
// From test/samples/ean13-*/
EXPECT_EQ(LookupCountryIdentifier("8413000065504"), "ES");
EXPECT_EQ(LookupCountryIdentifier("8413000065504 12"), "ES");
EXPECT_EQ(Lo... | /content/code_sandbox/test/unit/GTINTest.cpp | c++ | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 3,433 |
```objective-c
#pragma once
#include <string>
#include <string_view>
namespace ZXing {
class BitArray;
namespace Utility {
std::string ToString(const BitArray& arr, char one, char zero);
std::string ToString(const BitArray& BitArray);
BitArray ParseBitArray(std::string_view str, char one = 'X');
}} // ZXing::U... | /content/code_sandbox/test/unit/BitArrayUtility.h | objective-c | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 76 |
```c++
/*
*/
#include "Pattern.h"
#include "gtest/gtest.h"
using namespace ZXing;
constexpr int N = 33;
PatternRow pr;
TEST(PatternTest, AllWhite)
{
for (int s = 1; s <= N; ++s) {
std::vector<uint8_t> in(s, 0);
GetPatternRow(Range{in}, pr);
EXPECT_EQ(pr.size(), 1);
EXPECT_EQ(pr[0], s);
}
}
TEST(Patter... | /content/code_sandbox/test/unit/PatternTest.cpp | c++ | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 405 |
```c++
/*
*/
#include "Error.h"
#include "gtest/gtest.h"
using namespace ZXing;
TEST(ErrorTest, Default)
{
Error e;
EXPECT_FALSE(e);
EXPECT_EQ(e.type(), Error::Type::None);
EXPECT_EQ(e.msg().empty(), true);
EXPECT_EQ(e.location().empty(), true);
}
TEST(ErrorTest, Empty)
{
Error e = ChecksumError();
EXPECT... | /content/code_sandbox/test/unit/ErrorTest.cpp | c++ | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 201 |
```c++
/*
*/
#include "ZXAlgorithms.h"
#include "gtest/gtest.h"
using namespace ZXing;
TEST(ZXAlgorithmsTest, ToDigit)
{
EXPECT_EQ(ToDigit(0), '0');
EXPECT_EQ(ToDigit(9), '9');
EXPECT_THROW(ToDigit(-1), Error);
EXPECT_THROW(ToDigit(11), Error);
}
TEST(ZXAlgorithmsTest, ToString)
{
EXPECT_EQ(ToString(0, 1), "... | /content/code_sandbox/test/unit/ZXAlgorithmsTest.cpp | c++ | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 284 |
```c++
/*
*/
#include "Content.h"
#include "ECI.h"
#include "gtest/gtest.h"
using namespace ZXing;
using namespace testing;
#if __cplusplus > 201703L
namespace std {
bool operator==(const string& lhs, const char8_t* rhs)
{
return lhs == reinterpret_cast<const char*>(rhs);
}
} // namespace std
#endif
TEST(ContentT... | /content/code_sandbox/test/unit/ContentTest.cpp | c++ | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 816 |
```c++
/*
*/
#include "CharacterSet.h"
#include "TextDecoder.h"
#include "Utf.h"
#include "gtest/gtest.h"
#include "gmock/gmock.h"
using namespace ZXing;
using namespace testing;
namespace ZXing {
int Utf32ToUtf8(char32_t utf32, char* out);
}
// Encode Unicode codepoint `utf32` as UTF-8
std::string Utf32ToUtf8(con... | /content/code_sandbox/test/unit/TextDecoderTest.cpp | c++ | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 2,712 |
```c++
/*
*/
#include "ThresholdBinarizer.h"
#include "oned/ODReader.h"
#include "gtest/gtest.h"
using namespace ZXing;
// Helper to parse a 0/1 string into a BitMatrix
static BitMatrix ParseBitMatrix(const std::string& str, const int width)
{
const int height = narrow_cast<int>(str.length() / width);
BitMatrix ... | /content/code_sandbox/test/unit/ThresholdBinarizerTest.cpp | c++ | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 1,405 |
```c++
/*
*/
#include "BitHacks.h"
#include "gtest/gtest.h"
#include <vector>
TEST(BitHackTest, BitHacks)
{
using namespace ZXing::BitHacks;
EXPECT_EQ(NumberOfLeadingZeros(0), 32);
EXPECT_EQ(NumberOfLeadingZeros(1), 31);
EXPECT_EQ(NumberOfLeadingZeros(0xffffffff), 0);
// EXPECT_EQ(NumberOfTrailingZeros(0), 32)... | /content/code_sandbox/test/unit/BitHacksTest.cpp | c++ | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 431 |
```c++
/*
*/
#include "CharacterSet.h"
#include "ECI.h"
#include "gtest/gtest.h"
using namespace ZXing;
using namespace testing;
TEST(CharacterSetECITest, Charset2ECI)
{
EXPECT_EQ(ToInt(ToECI(CharacterSet::ISO8859_1)), 3);
EXPECT_EQ(ToInt(ToECI(CharacterSet::ISO8859_2)), 4);
EXPECT_EQ(ToInt(ToECI(CharacterSet::A... | /content/code_sandbox/test/unit/CharacterSetECITest.cpp | c++ | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 262 |
```objective-c
#pragma once
#include <random>
namespace ZXing {
class PseudoRandom {
std::minstd_rand _random;
public:
PseudoRandom(size_t seed) : _random(static_cast<std::minstd_rand::result_type>(seed)) {}
template <typename IntType>
IntType next(IntType low, IntType high) {
return std::uniform_int_distribu... | /content/code_sandbox/test/unit/PseudoRandom.h | objective-c | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 89 |
```c++
/*
*/
#include "CharacterSet.h"
#include "TextDecoder.h"
#include "TextEncoder.h"
#include "gtest/gtest.h"
using namespace ZXing;
using namespace testing;
template <typename CharT>
void EnDeCode(CharacterSet cs, const CharT* in, std::string_view out)
{
std::string bytes = TextEncoder::FromUnicode(reinterpr... | /content/code_sandbox/test/unit/TextEncoderTest.cpp | c++ | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 1,300 |
```c++
/*
*/
#include "GenericGF.h"
#include "PseudoRandom.h"
#include "ReedSolomonDecoder.h"
#include "ReedSolomonEncoder.h"
#include <algorithm>
#include <ostream>
static std::ostream& operator<<(std::ostream& out, const ZXing::GenericGF& field) {
out << "GF(" << field.size() << ',' << field.generatorBase() << ')... | /content/code_sandbox/test/unit/ReedSolomonTest.cpp | c++ | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 15,561 |
```c++
/*
*/
#include "BitArrayUtility.h"
#include "BitArray.h"
namespace ZXing { namespace Utility {
std::string ToString(const BitArray& arr)
{
return ToString(arr, 'X', '.');
}
std::string ToString(const BitArray& arr, char one, char zero)
{
std::string result;
result.reserve(arr.size());
for (bool bit : arr... | /content/code_sandbox/test/unit/BitArrayUtility.cpp | c++ | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 152 |
```c++
/*
*/
#include "qrcode/QRDecoder.h"
#include "BitMatrix.h"
#include "BitMatrixIO.h"
#include "DecoderResult.h"
#include "gtest/gtest.h"
using namespace ZXing;
using namespace ZXing::QRCode;
TEST(MQRDecoderTest, MQRCodeM3L)
{
const auto bitMatrix = ParseBitMatrix("XXXXXXX X X X X\n"
"X X ... | /content/code_sandbox/test/unit/qrcode/MQRDecoderTest.cpp | c++ | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 966 |
```c++
/*
*/
#include "HRI.h"
#include "gtest/gtest.h"
using namespace ZXing;
TEST(HRIFromGS1, Single)
{
// 2-digit AIs
// Fixed length
EXPECT_EQ(HRIFromGS1("00123456789012345678"), "(00)123456789012345678");
// Incorrect lengths
EXPECT_EQ(HRIFromGS1("0012345678901234567"), "");
EXPECT_EQ(HRIFromGS1("001234... | /content/code_sandbox/test/unit/GS1Test.cpp | c++ | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 4,176 |
```c++
/*
*/
#include "qrcode/QRFormatInformation.h"
#include "gtest/gtest.h"
using namespace ZXing;
using namespace ZXing::QRCode;
static const int MASKED_TEST_FORMAT_INFO = 0x2BED;
static const int MASKED_TEST_FORMAT_INFO2 = ((0x2BED << 1) & 0b1111111000000000) | 0b100000000 | (0x2BED & 0b11111111); // insert the... | /content/code_sandbox/test/unit/qrcode/QRFormatInformationTest.cpp | c++ | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 1,894 |
```c++
/*
*/
#include "BitMatrixIO.h"
#include "qrcode/QRWriter.h"
#include "qrcode/QRErrorCorrectionLevel.h"
#include "gtest/gtest.h"
#include <stdexcept>
using namespace ZXing;
using namespace ZXing::QRCode;
namespace {
void DoTest(const std::wstring& contents, ErrorCorrectionLevel ecLevel, int resolution, cons... | /content/code_sandbox/test/unit/qrcode/QRWriterTest.cpp | c++ | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 4,537 |
```c++
/*
*/
#include "qrcode/QRErrorCorrectionLevel.h"
#include "gtest/gtest.h"
using namespace ZXing;
using namespace ZXing::QRCode;
TEST(QRErrorCorrectionLevelTest, ForBits)
{
EXPECT_EQ(ErrorCorrectionLevel::Medium, ECLevelFromBits(0));
EXPECT_EQ(ErrorCorrectionLevel::Low, ECLevelFromBits(1));
EXPECT_EQ(Error... | /content/code_sandbox/test/unit/qrcode/QRErrorCorrectionLevelTest.cpp | c++ | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 361 |
```c++
/*
*/
#include "BitMatrix.h"
#include "BitMatrixIO.h"
#include "ByteArray.h"
#include "qrcode/QRBitMatrixParser.h"
#include "qrcode/QRFormatInformation.h"
#include "qrcode/QRVersion.h"
#include "gtest/gtest.h"
using namespace ZXing;
using namespace ZXing::QRCode;
TEST(QRBitMatrixParserTest, MQRCodeM3L)
{
co... | /content/code_sandbox/test/unit/qrcode/QRBitMatrixParserTest.cpp | c++ | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 607 |
```c++
/*
*/
#include "qrcode/QRDataMask.h"
#include "BitMatrix.h"
#include "gtest/gtest.h"
#include <functional>
using namespace ZXing;
using namespace ZXing::QRCode;
namespace {
void TestMaskAcrossDimensionsImpl(int maskIndex, bool isMicro, const int versionMax, const int dimensionStart, const int dimensionStep... | /content/code_sandbox/test/unit/qrcode/QRDataMaskTest.cpp | c++ | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 841 |
```c++
/*
*/
#include "BitArray.h"
#include "ByteArray.h"
#include "DecoderResult.h"
#include "qrcode/QRErrorCorrectionLevel.h"
#include "qrcode/QRVersion.h"
#include "gtest/gtest.h"
namespace ZXing {
namespace QRCode {
DecoderResult DecodeBitStream(ByteArray&& bytes, const Version& version, ErrorCorrectionLevel ... | /content/code_sandbox/test/unit/qrcode/QRDecodedBitStreamParserTest.cpp | c++ | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 1,815 |
```c++
/*
*/
#include "qrcode/QRCodecMode.h"
#include "qrcode/QRVersion.h"
#include "Error.h"
#include "gtest/gtest.h"
using namespace ZXing;
using namespace ZXing::QRCode;
TEST(QRModeTest, ForBits)
{
ASSERT_EQ(CodecMode::TERMINATOR, CodecModeForBits(0x00, Type::Model2));
ASSERT_EQ(CodecMode::NUMERIC, CodecModeFo... | /content/code_sandbox/test/unit/qrcode/QRModeTest.cpp | c++ | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 1,200 |
```c++
/*
*/
#include "BitArray.h"
#include "BitArrayUtility.h"
#include "BitMatrixIO.h"
#include "CharacterSet.h"
#include "TextDecoder.h"
#include "Utf.h"
#include "qrcode/QREncoder.h"
#include "qrcode/QRCodecMode.h"
#include "qrcode/QREncodeResult.h"
#include "qrcode/QRErrorCorrectionLevel.h"
#include "gtest/gtest... | /content/code_sandbox/test/unit/qrcode/QREncoderTest.cpp | c++ | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 9,449 |
```c++
/*
*/
#include "qrcode/QRDecoder.h"
#include "BitMatrix.h"
#include "BitMatrixIO.h"
#include "DecoderResult.h"
#include "ECI.h"
#include "gtest/gtest.h"
using namespace ZXing;
using namespace ZXing::QRCode;
TEST(RMQRDecoderTest, RMQRCodeR7x43M)
{
const auto bitMatrix = ParseBitMatrix(
"XXXXXXX X X X X X ... | /content/code_sandbox/test/unit/qrcode/RMQRDecoderTest.cpp | c++ | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 3,736 |
```c++
/*
*/
#include "qrcode/QRVersion.h"
#include "BitMatrix.h"
#include "BitMatrixIO.h"
#include "gtest/gtest.h"
using namespace ZXing;
using namespace ZXing::QRCode;
namespace {
void CheckVersion(const Version* version, int number, int dimension) {
ASSERT_NE(version, nullptr);
EXPECT_EQ(number, version->... | /content/code_sandbox/test/unit/qrcode/QRVersionTest.cpp | c++ | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 1,733 |
```c++
/*
*/
#include "oned/ODUPCEWriter.h"
#include "BitMatrixIO.h"
#include "gtest/gtest.h"
#include <stdexcept>
using namespace ZXing;
using namespace ZXing::OneD;
namespace {
std::string Encode(const std::string& input)
{
auto result = ToString(UPCEWriter().encode(input, 0, 0), '1', '0', false);
return re... | /content/code_sandbox/test/unit/oned/ODUPCEWriterTest.cpp | c++ | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 323 |
```c++
/*
*/
#include "BitArray.h"
#include "BitArrayUtility.h"
#include "HRI.h"
#include "oned/ODDataBarExpandedBitDecoder.h"
#include "gtest/gtest.h"
using namespace ZXing;
static std::string parse(std::string bitStr)
{
return HRIFromGS1(OneD::DataBar::DecodeExpandedBits(Utility::ParseBitArray(bitStr, '1')));
}
... | /content/code_sandbox/test/unit/oned/ODDataBarExpandedBitDecoderTest.cpp | c++ | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 687 |
```c++
/*
*/
#include "oned/ODCode128Reader.h"
#include "ReaderOptions.h"
#include "Barcode.h"
#include "gtest/gtest.h"
using namespace ZXing;
using namespace ZXing::OneD;
// Helper to call decodePattern()
static Barcode parse(const int startPattern, PatternRow row)
{
if (startPattern == 'A') {
row.insert(row.b... | /content/code_sandbox/test/unit/oned/ODCode128ReaderTest.cpp | c++ | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 1,377 |
```c++
/*
*/
#include "ByteArray.h"
#include "DecoderResult.h"
#include "gtest/gtest.h"
#include <utility>
namespace ZXing::MaxiCode::DecodedBitStreamParser {
DecoderResult Decode(ByteArray&& bytes, const int mode);
}
using namespace ZXing;
// Pad out to max data length 93 (mode 4)
static void pad(ByteArray& pad... | /content/code_sandbox/test/unit/maxicode/MCDecoderTest.cpp | c++ | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 2,765 |
```c++
/*
*/
#include "oned/ODCode39Writer.h"
#include "BitMatrixIO.h"
#include "gtest/gtest.h"
using namespace ZXing;
using namespace ZXing::OneD;
namespace {
std::string Encode(const std::wstring& input)
{
auto result = ToString(Code39Writer().encode(input, 0, 0), '1', '0', false);
return result.substr(0, r... | /content/code_sandbox/test/unit/oned/ODCode39WriterTest.cpp | c++ | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 883 |
```c++
/*
*/
#include "oned/ODUPCAWriter.h"
#include "BitMatrixIO.h"
#include "gtest/gtest.h"
using namespace ZXing;
using namespace ZXing::OneD;
namespace {
std::string Encode(const std::string& input)
{
auto result = ToString(UPCAWriter().encode(input, 0, 0), '1', '0', false);
return result.substr(0, result... | /content/code_sandbox/test/unit/oned/ODUPCAWriterTest.cpp | c++ | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 226 |
```c++
/*
*/
#include "oned/ODEAN13Writer.h"
#include "BitMatrixIO.h"
#include "gtest/gtest.h"
#include <stdexcept>
using namespace ZXing;
using namespace ZXing::OneD;
namespace {
std::string Encode(const std::string& input)
{
auto result = ToString(EAN13Writer().encode(input, 0, 0), '1', '0', false);
return ... | /content/code_sandbox/test/unit/oned/ODEAN13WriterTest.cpp | c++ | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 262 |
```c++
/*
*/
#include "oned/ODCode128Writer.h"
#include "BitMatrixIO.h"
#include "ReaderOptions.h"
#include "Barcode.h"
#include "oned/ODCode128Reader.h"
#include "gtest/gtest.h"
using namespace ZXing;
using namespace ZXing::OneD;
static const std::string FNC1 = "11110101110";
static const std::string FNC2 = "11110... | /content/code_sandbox/test/unit/oned/ODCode128WriterTest.cpp | c++ | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 1,513 |
```c++
/*
*/
#include "oned/ODCode93Writer.h"
#include "BitMatrixIO.h"
#include "gtest/gtest.h"
namespace ZXing { namespace OneD {
std::string Code93ConvertToExtended(const std::wstring& contents);
}}
using namespace ZXing;
using namespace ZXing::OneD;
namespace {
std::string Encode(const std::wstring& input)
{... | /content/code_sandbox/test/unit/oned/ODCode93WriterTest.cpp | c++ | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 701 |
```c++
/*
*/
#include "oned/ODCode39Reader.h"
#include "ReaderOptions.h"
#include "Barcode.h"
#include "gtest/gtest.h"
using namespace ZXing;
using namespace ZXing::OneD;
// Helper to call decodePattern()
static Barcode parse(PatternRow row, ReaderOptions opts = {})
{
Code39Reader reader(opts);
row.insert(row.b... | /content/code_sandbox/test/unit/oned/ODCode39ReaderTest.cpp | c++ | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 613 |
```c++
/*
*/
#include "oned/ODDataBarReader.h"
#include "ReaderOptions.h"
#include "Barcode.h"
#include "gtest/gtest.h"
using namespace ZXing;
using namespace ZXing::OneD;
// Helper to call decodePattern()
static Barcode parse(PatternRow row, ReaderOptions opts = {})
{
DataBarReader reader(opts);
row.insert(row... | /content/code_sandbox/test/unit/oned/ODDataBarReaderTest.cpp | c++ | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 326 |
```c++
/*
*/
#include "oned/ODCode93Reader.h"
#include "BitArray.h"
#include "BitArrayUtility.h"
#include "ReaderOptions.h"
#include "Barcode.h"
#include "gtest/gtest.h"
using namespace ZXing;
using namespace ZXing::OneD;
static std::string Decode(std::string_view input)
{
ReaderOptions opts;
auto row = Utilit... | /content/code_sandbox/test/unit/oned/ODCode93ReaderTest.cpp | c++ | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 252 |
```c++
/*
*/
#include "oned/ODCodabarWriter.h"
#include "BitMatrixIO.h"
#include "ReaderOptions.h"
#include "Barcode.h"
#include "oned/ODCodabarReader.h"
#include "gtest/gtest.h"
#include <stdexcept>
using namespace ZXing;
using namespace ZXing::OneD;
namespace {
std::string Encode(const std::string& input)
{
a... | /content/code_sandbox/test/unit/oned/ODCodaBarWriterTest.cpp | c++ | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 440 |
```c++
/*
*/
#include "oned/ODEAN8Writer.h"
#include "BitMatrixIO.h"
#include "gtest/gtest.h"
using namespace ZXing;
using namespace ZXing::OneD;
namespace {
std::string Encode(const std::string& input)
{
auto result = ToString(EAN8Writer().encode(input, 0, 0), '1', '0', false);
return result.substr(0, result... | /content/code_sandbox/test/unit/oned/ODEAN8WriterTest.cpp | c++ | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 233 |
```c++
/*
*/
#include "oned/ODITFWriter.h"
#include "BitMatrixIO.h"
#include "gtest/gtest.h"
#include <stdexcept>
using namespace ZXing;
using namespace ZXing::OneD;
namespace {
std::string Encode(const std::wstring& input)
{
auto result = ToString(ITFWriter().encode(input, 0, 0), '1', '0', false);
return res... | /content/code_sandbox/test/unit/oned/ODITFWriterTest.cpp | c++ | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 185 |
```c++
/*
*/
#include "BitArray.h"
#include "BitArrayUtility.h"
#include "ReaderOptions.h"
#include "Barcode.h"
#include "oned/ODCode39Reader.h"
#include "gtest/gtest.h"
using namespace ZXing;
using namespace ZXing::OneD;
static std::string Decode(std::string_view encoded)
{
auto opts = ReaderOptions();
BitArray ... | /content/code_sandbox/test/unit/oned/ODCode39ExtendedModeTest.cpp | c++ | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 764 |
```c++
/*
*/
#include "CharacterSet.h"
#include "pdf417/PDFCompaction.h"
#include "pdf417/PDFHighLevelEncoder.h"
#include "gtest/gtest.h"
using namespace ZXing;
using namespace ZXing::Pdf417;
TEST(PDF417HighLevelEncoderTest, EncodeAuto)
{
auto encoded = HighLevelEncoder::EncodeHighLevel(L"ABCD", Compaction::AUTO, ... | /content/code_sandbox/test/unit/pdf417/PDF417HighLevelEncoderTest.cpp | c++ | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 587 |
```c++
/*
*/
#include "PseudoRandom.h"
#include "ZXAlgorithms.h"
#include "gtest/gtest.h"
namespace ZXing {
namespace Pdf417 {
bool DecodeErrorCorrection(std::vector<int>& received, int numECCodewords, const std::vector<int>& erasures, int& nbErrors);
}
}
using namespace ZXing;
using namespace ZXing::Pdf417;
s... | /content/code_sandbox/test/unit/pdf417/PDF417ErrorCorrectionTest.cpp | c++ | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 1,220 |
```c++
/*
*/
#include "DecoderResult.h"
#include "pdf417/PDFScanningDecoder.h"
#include "gtest/gtest.h"
using namespace ZXing;
using namespace ZXing::Pdf417;
// Shorthand for DecodeCodewords()
static DecoderResult decode(std::vector<int>& codewords)
{
std::vector<int> erasures;
auto result = DecodeCodewords(codew... | /content/code_sandbox/test/unit/pdf417/PDF417ScanningDecoderTest.cpp | c++ | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 331 |
```c++
/*
*/
#include "BitMatrixIO.h"
#include "pdf417/PDFWriter.h"
#include "gtest/gtest.h"
using namespace ZXing;
using namespace ZXing::Pdf417;
TEST(PDF417WriterTest, DataMatrixImageWriter)
{
Writer writer;
writer.setMargin(0);
int size = 64;
BitMatrix matrix = writer.encode(L"Hello Google", size, size);
au... | /content/code_sandbox/test/unit/pdf417/PDF417WriterTest.cpp | c++ | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 2,957 |
```c++
/*
*/
#include "aztec/AZHighLevelEncoder.h"
#include "BitArray.h"
#include "BitArrayUtility.h"
#include "DecoderResult.h"
#include "StructuredAppend.h"
#include "gtest/gtest.h"
#include <algorithm>
namespace ZXing::Aztec {
DecoderResult Decode(const BitArray& bits);
}
using namespace ZXing;
namespace {
s... | /content/code_sandbox/test/unit/aztec/AZHighLevelEncoderTest.cpp | c++ | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 2,407 |
```c++
/*
*/
#include "DecoderResult.h"
#include "pdf417/PDFDecoder.h"
#include "pdf417/PDFDecoderResultExtra.h"
#include "gtest/gtest.h"
namespace ZXing::Pdf417 {
int DecodeMacroBlock(const std::vector<int>& codewords, int codeIndex, DecoderResultExtra& resultMetadata);
}
using namespace ZXing;
using namespace ZXi... | /content/code_sandbox/test/unit/pdf417/PDF417DecoderTest.cpp | c++ | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 9,306 |
```c++
/*
*/
#include "BitMatrix.h"
#include "CharacterSet.h"
#include "DecoderResult.h"
#include "PseudoRandom.h"
#include "TextEncoder.h"
#include "aztec/AZDecoder.h"
#include "aztec/AZDetector.h"
#include "aztec/AZDetectorResult.h"
#include "aztec/AZEncoder.h"
#include "aztec/AZWriter.h"
#include <algorithm>
#incl... | /content/code_sandbox/test/unit/aztec/AZEncodeDecodeTest.cpp | c++ | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 3,499 |
```c++
/*
*/
#include "aztec/AZEncoder.h"
#include "BitArray.h"
#include "BitArrayUtility.h"
#include "BitMatrixIO.h"
#include "gtest/gtest.h"
#include <algorithm>
#include <stdexcept>
namespace ZXing {
namespace Aztec {
void GenerateModeMessage(bool compact, int layers, int messageSizeInWords, BitArray& modeMess... | /content/code_sandbox/test/unit/aztec/AZEncoderTest.cpp | c++ | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 4,002 |
```c++
/*
*/
#include "aztec/AZDecoder.h"
#include "BitArray.h"
#include "BitMatrixIO.h"
#include "DecoderResult.h"
#include "aztec/AZDetectorResult.h"
#include "gtest/gtest.h"
#include <string_view>
#include <utility>
namespace ZXing::Aztec {
DecoderResult Decode(const BitArray& bits);
}
using namespace ZXing;
... | /content/code_sandbox/test/unit/aztec/AZDecoderTest.cpp | c++ | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 5,309 |
```c++
/*
*/
#include "BitMatrixIO.h"
#include "DecoderResult.h"
#include "datamatrix/DMDecoder.h"
#include "datamatrix/DMWriter.h"
#include "gtest/gtest.h"
using namespace ZXing;
namespace {
void TestEncodeDecode(const std::wstring& data, DataMatrix::SymbolShape shape = DataMatrix::SymbolShape::NONE)
{
BitMat... | /content/code_sandbox/test/unit/datamatrix/DMEncodeDecodeTest.cpp | c++ | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 1,483 |
```c++
/*
*/
#include "datamatrix/DMSymbolInfo.h"
#include "gtest/gtest.h"
using namespace ZXing::DataMatrix;
TEST(DMSymbolInfoTest, SymbolInfo)
{
auto info = SymbolInfo::Lookup(3);
EXPECT_EQ(5, info->errorCodewords());
EXPECT_EQ(8, info->matrixWidth());
EXPECT_EQ(8, info->matrixHeight());
EXPECT_EQ(10, info->... | /content/code_sandbox/test/unit/datamatrix/DMSymbolInfoTest.cpp | c++ | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 656 |
```c++
/*
*/
#include "ByteArray.h"
#include "DecoderResult.h"
#include "gtest/gtest.h"
#include <utility>
namespace ZXing::DataMatrix::DecodedBitStreamParser {
DecoderResult Decode(ByteArray&& bytes, const bool isDMRE);
}
using namespace ZXing;
// Helper to call Decode()
static DecoderResult parse(ByteArray byt... | /content/code_sandbox/test/unit/datamatrix/DMDecodedBitStreamParserTest.cpp | c++ | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 3,870 |
```c++
/*
*/
#include "datamatrix/DMWriter.h"
#include "BitMatrixIO.h"
#include "gtest/gtest.h"
using namespace ZXing;
using namespace ZXing::DataMatrix;
TEST(DMWriterTest, ImageWriter)
{
int bigEnough = 64;
Writer writer;
writer.setMargin(0).setShapeHint(SymbolShape::SQUARE);
auto matrix = writer.encode(L"Hell... | /content/code_sandbox/test/unit/datamatrix/DMWriterTest.cpp | c++ | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 3,212 |
```c++
/*
*/
#include "ByteArray.h"
#include "CharacterSet.h"
#include "ZXAlgorithms.h"
#include "datamatrix/DMHighLevelEncoder.h"
#include "datamatrix/DMSymbolInfo.h"
#include "gtest/gtest.h"
namespace ZXing {
namespace DataMatrix {
void OverrideSymbolSet(const SymbolInfo* symbols, size_t count);
void UseDefau... | /content/code_sandbox/test/unit/datamatrix/DMHighLevelEncodeTest.cpp | c++ | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 4,936 |
```c++
/*
*/
#include "aztec/AZDetector.h"
#include "BitMatrixIO.h"
#include "DecoderResult.h"
#include "PseudoRandom.h"
#include "Utf.h"
#include "aztec/AZDecoder.h"
#include "aztec/AZDetectorResult.h"
#include "gtest/gtest.h"
#include <string_view>
#include <vector>
using namespace ZXing;
namespace {
struct Po... | /content/code_sandbox/test/unit/aztec/AZDetectorTest.cpp | c++ | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 15,758 |
```unknown
Thanks to Enrique G-S for contributing many of the EAN-13 test images.
``` | /content/code_sandbox/test/samples/README | unknown | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 18 |
```c++
/*
*/
#include <stdint.h>
#include <stddef.h>
#include "BitArray.h"
#include "Error.h"
#include "oned/ODDataBarExpandedBitDecoder.h"
using namespace ZXing;
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
{
if (size < 2)
return 0;
BitArray bits;
for (size_t i = 0; i < size; ++i)... | /content/code_sandbox/test/fuzz/fuzzDBEDecoder.cpp | c++ | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 148 |
```c++
/*
*/
#include "BitMatrixIO.h"
#include "ByteArray.h"
#include "datamatrix/DMBitLayout.h"
#include "gtest/gtest.h"
#include <algorithm>
#include <iterator>
#include <sstream>
using namespace ZXing;
using namespace ZXing::DataMatrix;
namespace {
ByteArray Unvisualize(const char* visualized) {
std::istring... | /content/code_sandbox/test/unit/datamatrix/DMPlacementTest.cpp | c++ | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 330 |
```c++
/*
*/
#include "ReadBarcode.h"
#include <csignal>
#include <cstddef>
#include <cstdint>
#include <cstdlib>
using namespace ZXing;
uint64_t Expand(uint8_t b)
{
uint64_t shift = 0x0000040810204081ul; // bits set: 0, 7, 14, 21, 28, 35, 42
uint64_t mask = 0x0001010101010101ul; // bits set: 0, 8, 16, 24,... | /content/code_sandbox/test/fuzz/fuzzReadMatrix.cpp | c++ | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 538 |
```c++
/*
*/
#include "BitArray.h"
#include "ByteArray.h"
#include "DecoderResult.h"
#include "qrcode/QRErrorCorrectionLevel.h"
#include "qrcode/QRVersion.h"
#include "pdf417/PDFDecoder.h"
#include <algorithm>
#include <cstddef>
#include <cstdint>
using namespace ZXing;
namespace ZXing::Aztec {
DecoderResult Decod... | /content/code_sandbox/test/fuzz/fuzzDecodeMatrix.cpp | c++ | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 549 |
```c++
/*
*/
#include <stdint.h>
#include <stddef.h>
#include "ByteArray.h"
#include "datamatrix/DMHighLevelEncoder.h"
using namespace ZXing;
using namespace ZXing::DataMatrix;
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
{
std::wstring txt(data, data + size);
try {
Encode(txt);
... | /content/code_sandbox/test/fuzz/fuzzDMEncoder.cpp | c++ | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 96 |
```objective-c
//
#import <Foundation/Foundation.h>
#ifndef ZXIFormat_h
#define ZXIFormat_h
typedef NS_ENUM(NSInteger, ZXIFormat) {
NONE, AZTEC, CODABAR, CODE_39, CODE_93, CODE_128, DATA_BAR, DATA_BAR_EXPANDED,
DATA_MATRIX, DX_FILM_EDGE, EAN_8, EAN_13, ITF, MAXICODE, PDF_417, QR_CODE, MICRO_QR_CODE, RMQR_CODE... | /content/code_sandbox/wrappers/ios/Sources/Wrapper/ZXIFormat.h | objective-c | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 123 |
```objective-c
//
#ifndef UmbrellaHeader_h
#define UmbrellaHeader_h
#import "Reader/ZXIBarcodeReader.h"
#import "Reader/ZXIResult.h"
#import "Reader/ZXIPosition.h"
#import "Reader/ZXIPoint.h"
#import "Reader/ZXIGTIN.h"
#import "Reader/ZXIReaderOptions.h"
#import "Writer/ZXIWriterOptions.h"
#import "Writer/ZXIBarcodeW... | /content/code_sandbox/wrappers/ios/Sources/Wrapper/UmbrellaHeader.h | objective-c | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 106 |
```objective-c
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
#define ZXIErrorDomain @"ZXIErrorDomain"
typedef NS_ENUM(NSInteger, ZXIBarcodeReaderError) {
ZXIReaderError,
};
typedef NS_ENUM(NSInteger, ZXIBarcodeWriterError) {
ZXIWriterError,
};
void SetNSError(NSError *__autoreleasing _Nulla... | /content/code_sandbox/wrappers/ios/Sources/Wrapper/ZXIErrors.h | objective-c | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 93 |
```c++
/*
*/
#include <stdint.h>
#include <stddef.h>
#include "oned/ODMultiUPCEANReader.h"
#include "oned/ODCode39Reader.h"
#include "oned/ODCode93Reader.h"
#include "oned/ODCode128Reader.h"
#include "oned/ODDataBarReader.h"
#include "oned/ODDataBarExpandedReader.h"
#include "oned/ODDXFilmEdgeReader.h"
#include "one... | /content/code_sandbox/test/fuzz/fuzzReadLinear.cpp | c++ | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 506 |
```unknown
module ZXingCpp {
umbrella header "UmbrellaHeader.h"
export *
module * { export * }
}
``` | /content/code_sandbox/wrappers/ios/Sources/Wrapper/module.modulemap | unknown | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 27 |
```objective-c
//
#import <Foundation/Foundation.h>
#import "BarcodeFormat.h"
#import "ZXIFormat.h"
NS_ASSUME_NONNULL_BEGIN
ZXing::BarcodeFormat BarcodeFormatFromZXIFormat(ZXIFormat format);
ZXIFormat ZXIFormatFromBarcodeFormat(ZXing::BarcodeFormat format);
NS_ASSUME_NONNULL_END
``` | /content/code_sandbox/wrappers/ios/Sources/Wrapper/ZXIFormatHelper.h | objective-c | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 64 |
```xml
//
#import "ZXIErrors.h"
void SetNSError(NSError *__autoreleasing _Nullable* error,
NSInteger code,
const char* message) {
if (error == nil) {
return;
}
NSString *errorDescription = @"Unknown C++ error";
if (message && strlen(message) > 0) {
error... | /content/code_sandbox/wrappers/ios/Sources/Wrapper/ZXIErrors.mm | xml | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 157 |
```objective-c
//
#import <Foundation/Foundation.h>
#import <CoreGraphics/CoreGraphics.h>
#import <CoreImage/CoreImage.h>
#import "ZXIResult.h"
#import "ZXIReaderOptions.h"
NS_ASSUME_NONNULL_BEGIN
@interface ZXIBarcodeReader : NSObject
@property(nonatomic, strong) ZXIReaderOptions *options;
-(instancetype)initWithO... | /content/code_sandbox/wrappers/ios/Sources/Wrapper/Reader/ZXIBarcodeReader.h | objective-c | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 190 |
```objective-c
//
#import "ZXIPosition.h"
@implementation ZXIPosition
- (instancetype)initWithTopLeft:(ZXIPoint *)topLeft
topRight:(ZXIPoint *)topRight
bottomRight:(ZXIPoint *)bottomRight
bottomLeft:(ZXIPoint *)bottomLeft {
self = [super init];
... | /content/code_sandbox/wrappers/ios/Sources/Wrapper/Reader/ZXIPosition.m | objective-c | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 106 |
```xml
//
#import "ZXIFormatHelper.h"
ZXing::BarcodeFormat BarcodeFormatFromZXIFormat(ZXIFormat format) {
switch (format) {
case ZXIFormat::ANY:
return ZXing::BarcodeFormat::Any;
case ZXIFormat::MATRIX_CODES:
return ZXing::BarcodeFormat::MatrixCodes;
case ZXIFormat:... | /content/code_sandbox/wrappers/ios/Sources/Wrapper/ZXIFormatHelper.mm | xml | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 1,088 |
```objective-c
//
#import <Foundation/Foundation.h>
#import "ZXIPoint.h"
NS_ASSUME_NONNULL_BEGIN
@interface ZXIPosition : NSObject
@property(nonatomic, nonnull)ZXIPoint *topLeft;
@property(nonatomic, nonnull)ZXIPoint *topRight;
@property(nonatomic, nonnull)ZXIPoint *bottomRight;
@property(nonatomic, nonnull)ZXIPoin... | /content/code_sandbox/wrappers/ios/Sources/Wrapper/Reader/ZXIPosition.h | objective-c | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 133 |
```objective-c
//
#import "ZXIPoint.h"
@implementation ZXIPoint
- (instancetype)initWithX:(NSInteger)x y:(NSInteger)y {
self = [super init];
self.x = x;
self.y = y;
return self;
}
@end
``` | /content/code_sandbox/wrappers/ios/Sources/Wrapper/Reader/ZXIPoint.m | objective-c | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 53 |
```objective-c
//
#import <Foundation/Foundation.h>
#import "ZXIPosition.h"
#import "Barcode.h"
NS_ASSUME_NONNULL_BEGIN
@interface ZXIPosition(Helper)
- (instancetype)initWithPosition:(ZXing::Position)position;
@end
NS_ASSUME_NONNULL_END
``` | /content/code_sandbox/wrappers/ios/Sources/Wrapper/Reader/ZXIPosition+Helper.h | objective-c | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 52 |
```objective-c
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface ZXIPoint : NSObject
@property(nonatomic) NSInteger x;
@property(nonatomic) NSInteger y;
- (instancetype)initWithX:(NSInteger)x y:(NSInteger)y;
@end
NS_ASSUME_NONNULL_END
``` | /content/code_sandbox/wrappers/ios/Sources/Wrapper/Reader/ZXIPoint.h | objective-c | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 52 |
```objective-c
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
typedef NS_ENUM(NSInteger, ZXIBinarizer) {
ZXIBinarizerLocalAverage,
ZXIBinarizerGlobalHistogram,
ZXIBinarizerFixedThreshold,
ZXIBinarizerBoolCast
};
typedef NS_ENUM(NSInteger, ZXIEanAddOnSymbol) {
ZXIEanAddOnSymbolIgnor... | /content/code_sandbox/wrappers/ios/Sources/Wrapper/Reader/ZXIReaderOptions.h | objective-c | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 331 |
```xml
//
#import "ZXIPosition+Helper.h"
#import "ZXIPoint.h"
@implementation ZXIPosition(Helper)
-(instancetype)initWithPosition:(ZXing::Position)position {
return [self initWithTopLeft:[[ZXIPoint alloc] initWithX:position.topLeft().x y:position.topLeft().y]
topRight:[[ZXIPoint alloc] in... | /content/code_sandbox/wrappers/ios/Sources/Wrapper/Reader/ZXIPosition+Helper.mm | xml | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 144 |
```objective-c
//
#import <Foundation/Foundation.h>
#import "ZXIFormat.h"
#import "ZXIPosition.h"
#import "ZXIGTIN.h"
NS_ASSUME_NONNULL_BEGIN
@interface ZXIResult : NSObject
@property(nonatomic, strong) NSString *text;
@property(nonatomic, strong) NSData *bytes;
@property(nonatomic, strong) ZXIPosition *position;
@p... | /content/code_sandbox/wrappers/ios/Sources/Wrapper/Reader/ZXIResult.h | objective-c | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 282 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.