couchbase 4.2.1 → 4.2.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (1610) hide show
  1. package/CMakeLists.txt +1 -0
  2. package/deps/couchbase-cxx-client/.github/workflows/sanitizers.yml +20 -12
  3. package/deps/couchbase-cxx-client/.github/workflows/tests.yml +5 -3
  4. package/deps/couchbase-cxx-client/.gitmodules +3 -0
  5. package/deps/couchbase-cxx-client/.idea/misc.xml +1 -0
  6. package/deps/couchbase-cxx-client/.idea/vcs.xml +3 -0
  7. package/deps/couchbase-cxx-client/CMakeLists.txt +25 -6
  8. package/deps/couchbase-cxx-client/README.md +3 -3
  9. package/deps/couchbase-cxx-client/bin/build-tests +3 -0
  10. package/deps/couchbase-cxx-client/bin/build-tests.rb +9 -0
  11. package/deps/couchbase-cxx-client/bin/init-cluster +38 -11
  12. package/deps/couchbase-cxx-client/bin/run-unit-tests +9 -9
  13. package/deps/couchbase-cxx-client/cmake/CompilerWarnings.cmake +14 -3
  14. package/deps/couchbase-cxx-client/cmake/Documentation.cmake +4 -3
  15. package/deps/couchbase-cxx-client/cmake/OpenSSL.cmake +52 -7
  16. package/deps/couchbase-cxx-client/cmake/Testing.cmake +4 -4
  17. package/deps/couchbase-cxx-client/cmake/ThirdPartyDependencies.cmake +4 -0
  18. package/deps/couchbase-cxx-client/cmake/VersionInfo.cmake +52 -4
  19. package/deps/couchbase-cxx-client/cmake/build_version.hxx.in +1 -0
  20. package/deps/couchbase-cxx-client/cmake/test_openssl.cxx +7 -0
  21. package/deps/couchbase-cxx-client/core/bucket.cxx +3 -2
  22. package/deps/couchbase-cxx-client/core/bucket.hxx +9 -0
  23. package/deps/couchbase-cxx-client/core/cluster.hxx +15 -5
  24. package/deps/couchbase-cxx-client/core/cluster_options.cxx +2 -2
  25. package/deps/couchbase-cxx-client/core/cluster_options.hxx +3 -7
  26. package/deps/couchbase-cxx-client/core/cluster_options_fwd.hxx +26 -0
  27. package/deps/couchbase-cxx-client/core/config_profile.hxx +2 -65
  28. package/deps/couchbase-cxx-client/core/config_profiles.cxx +79 -0
  29. package/deps/couchbase-cxx-client/core/config_profiles.hxx +56 -0
  30. package/deps/couchbase-cxx-client/core/crypto/CMakeLists.txt +5 -1
  31. package/deps/couchbase-cxx-client/core/error_context/analytics.hxx +2 -1
  32. package/deps/couchbase-cxx-client/core/error_context/http.hxx +2 -1
  33. package/deps/couchbase-cxx-client/core/error_context/query.hxx +2 -1
  34. package/deps/couchbase-cxx-client/core/error_context/search.hxx +2 -1
  35. package/deps/couchbase-cxx-client/core/error_context/view.hxx +2 -1
  36. package/deps/couchbase-cxx-client/core/impl/analytics.cxx +236 -0
  37. package/deps/couchbase-cxx-client/core/impl/build_deferred_query_indexes.cxx +17 -6
  38. package/deps/couchbase-cxx-client/core/impl/cluster.cxx +2 -2
  39. package/deps/couchbase-cxx-client/core/impl/collection_query_index_manager.cxx +93 -0
  40. package/deps/couchbase-cxx-client/core/impl/configuration_profiles_registry.cxx +11 -0
  41. package/deps/couchbase-cxx-client/core/impl/create_query_index.cxx +119 -0
  42. package/deps/couchbase-cxx-client/core/impl/dns_srv_tracker.cxx +5 -3
  43. package/deps/couchbase-cxx-client/core/impl/drop_query_index.cxx +108 -0
  44. package/deps/couchbase-cxx-client/core/impl/get.cxx +1 -1
  45. package/deps/couchbase-cxx-client/core/impl/get_all_query_indexes.cxx +76 -0
  46. package/deps/couchbase-cxx-client/core/impl/query.cxx +24 -24
  47. package/deps/couchbase-cxx-client/core/impl/subdoc/lookup_in_macro.cxx +1 -0
  48. package/deps/couchbase-cxx-client/core/impl/subdoc/mutate_in_macro.cxx +1 -0
  49. package/deps/couchbase-cxx-client/core/impl/transaction_get_result.cxx +54 -0
  50. package/deps/couchbase-cxx-client/core/impl/watch_query_indexes.cxx +168 -0
  51. package/deps/couchbase-cxx-client/core/io/dns_client.cxx +225 -0
  52. package/deps/couchbase-cxx-client/core/io/dns_client.hxx +19 -188
  53. package/deps/couchbase-cxx-client/core/io/http_context.hxx +1 -1
  54. package/deps/couchbase-cxx-client/core/io/http_session.hxx +10 -0
  55. package/deps/couchbase-cxx-client/core/io/http_session_manager.hxx +5 -3
  56. package/deps/couchbase-cxx-client/core/io/mcbp_session.cxx +42 -1
  57. package/deps/couchbase-cxx-client/core/io/retry_orchestrator.hxx +3 -2
  58. package/deps/couchbase-cxx-client/core/logger/configuration.hxx +3 -0
  59. package/deps/couchbase-cxx-client/core/logger/level.hxx +21 -0
  60. package/deps/couchbase-cxx-client/core/logger/logger.hxx +4 -6
  61. package/deps/couchbase-cxx-client/core/meta/CMakeLists.txt +7 -3
  62. package/deps/couchbase-cxx-client/core/meta/features.hxx +31 -0
  63. package/deps/couchbase-cxx-client/core/meta/version.cxx +86 -5
  64. package/deps/couchbase-cxx-client/core/meta/version.hxx +12 -1
  65. package/deps/couchbase-cxx-client/core/metrics/CMakeLists.txt +4 -1
  66. package/deps/couchbase-cxx-client/core/metrics/logging_meter.cxx +46 -5
  67. package/deps/couchbase-cxx-client/core/metrics/logging_meter.hxx +10 -26
  68. package/deps/couchbase-cxx-client/core/operations/document_analytics.cxx +1 -0
  69. package/deps/couchbase-cxx-client/core/operations/document_analytics.hxx +1 -0
  70. package/deps/couchbase-cxx-client/core/operations/document_append.hxx +1 -1
  71. package/deps/couchbase-cxx-client/core/operations/document_decrement.hxx +1 -1
  72. package/deps/couchbase-cxx-client/core/operations/document_exists.hxx +1 -1
  73. package/deps/couchbase-cxx-client/core/operations/document_get.hxx +1 -1
  74. package/deps/couchbase-cxx-client/core/operations/document_get_and_lock.hxx +1 -1
  75. package/deps/couchbase-cxx-client/core/operations/document_get_and_touch.hxx +1 -1
  76. package/deps/couchbase-cxx-client/core/operations/document_get_projected.cxx +3 -2
  77. package/deps/couchbase-cxx-client/core/operations/document_get_projected.hxx +1 -1
  78. package/deps/couchbase-cxx-client/core/operations/document_increment.hxx +1 -1
  79. package/deps/couchbase-cxx-client/core/operations/document_insert.hxx +1 -1
  80. package/deps/couchbase-cxx-client/core/operations/document_lookup_in.hxx +1 -1
  81. package/deps/couchbase-cxx-client/core/operations/document_mutate_in.hxx +1 -1
  82. package/deps/couchbase-cxx-client/core/operations/document_prepend.hxx +1 -1
  83. package/deps/couchbase-cxx-client/core/operations/document_query.cxx +12 -12
  84. package/deps/couchbase-cxx-client/core/operations/document_query.hxx +7 -3
  85. package/deps/couchbase-cxx-client/core/operations/document_remove.hxx +1 -1
  86. package/deps/couchbase-cxx-client/core/operations/document_replace.hxx +1 -1
  87. package/deps/couchbase-cxx-client/core/operations/document_search.cxx +6 -2
  88. package/deps/couchbase-cxx-client/core/operations/document_search.hxx +1 -1
  89. package/deps/couchbase-cxx-client/core/operations/document_touch.hxx +1 -1
  90. package/deps/couchbase-cxx-client/core/operations/document_unlock.hxx +1 -1
  91. package/deps/couchbase-cxx-client/core/operations/document_upsert.hxx +1 -1
  92. package/deps/couchbase-cxx-client/core/operations/document_view.hxx +1 -0
  93. package/deps/couchbase-cxx-client/core/operations/management/analytics_problem.hxx +2 -1
  94. package/deps/couchbase-cxx-client/core/operations/management/eventing_problem.hxx +2 -1
  95. package/deps/couchbase-cxx-client/core/operations/management/query_index_build.cxx +8 -14
  96. package/deps/couchbase-cxx-client/core/operations/management/query_index_build.hxx +2 -1
  97. package/deps/couchbase-cxx-client/core/operations/management/query_index_build_deferred.hxx +15 -8
  98. package/deps/couchbase-cxx-client/core/operations/management/query_index_create.cxx +7 -14
  99. package/deps/couchbase-cxx-client/core/operations/management/query_index_create.hxx +2 -0
  100. package/deps/couchbase-cxx-client/core/operations/management/query_index_drop.cxx +11 -16
  101. package/deps/couchbase-cxx-client/core/operations/management/query_index_drop.hxx +2 -0
  102. package/deps/couchbase-cxx-client/core/operations/management/query_index_get_all.cxx +8 -12
  103. package/deps/couchbase-cxx-client/core/operations/management/query_index_get_all.hxx +4 -3
  104. package/deps/couchbase-cxx-client/core/operations/management/query_index_get_all_deferred.cxx +21 -12
  105. package/deps/couchbase-cxx-client/core/operations/management/query_index_get_all_deferred.hxx +3 -2
  106. package/deps/couchbase-cxx-client/core/origin.hxx +1 -1
  107. package/deps/couchbase-cxx-client/core/platform/base64.cc +2 -1
  108. package/deps/couchbase-cxx-client/core/platform/uuid.cc +1 -2
  109. package/deps/couchbase-cxx-client/core/protocol/client_opcode.hxx +1 -0
  110. package/deps/couchbase-cxx-client/core/protocol/cmd_hello.hxx +5 -1
  111. package/deps/couchbase-cxx-client/core/protocol/cmd_info.hxx +2 -1
  112. package/deps/couchbase-cxx-client/core/public_fwd.hxx +21 -0
  113. package/deps/couchbase-cxx-client/core/query_context.hxx +79 -0
  114. package/deps/couchbase-cxx-client/core/tls_verify_mode.hxx +26 -0
  115. package/deps/couchbase-cxx-client/core/topology/configuration.cxx +15 -2
  116. package/deps/couchbase-cxx-client/core/topology/configuration.hxx +5 -1
  117. package/deps/couchbase-cxx-client/core/tracing/CMakeLists.txt +3 -1
  118. package/deps/couchbase-cxx-client/core/tracing/threshold_logging_tracer.cxx +19 -4
  119. package/deps/couchbase-cxx-client/core/tracing/threshold_logging_tracer.hxx +2 -2
  120. package/deps/couchbase-cxx-client/core/transactions/active_transaction_record.hxx +2 -2
  121. package/deps/couchbase-cxx-client/core/transactions/async_attempt_context.hxx +10 -4
  122. package/deps/couchbase-cxx-client/core/transactions/atr_cleanup_entry.cxx +53 -63
  123. package/deps/couchbase-cxx-client/core/transactions/atr_ids.cxx +1 -1
  124. package/deps/couchbase-cxx-client/core/transactions/attempt_context.hxx +8 -3
  125. package/deps/couchbase-cxx-client/core/transactions/attempt_context_impl.cxx +240 -169
  126. package/deps/couchbase-cxx-client/core/transactions/attempt_context_impl.hxx +106 -88
  127. package/deps/couchbase-cxx-client/core/transactions/attempt_context_testing_hooks.cxx +93 -0
  128. package/deps/couchbase-cxx-client/core/transactions/attempt_context_testing_hooks.hxx +48 -75
  129. package/deps/couchbase-cxx-client/core/transactions/cleanup_testing_hooks.cxx +52 -0
  130. package/deps/couchbase-cxx-client/core/transactions/cleanup_testing_hooks.hxx +17 -31
  131. package/deps/couchbase-cxx-client/core/transactions/exceptions.cxx +0 -1
  132. package/deps/couchbase-cxx-client/core/transactions/exceptions.hxx +14 -11
  133. package/deps/couchbase-cxx-client/core/transactions/forward_compat.hxx +6 -6
  134. package/deps/couchbase-cxx-client/core/transactions/internal/atr_cleanup_entry.hxx +51 -13
  135. package/deps/couchbase-cxx-client/core/transactions/internal/client_record.hxx +26 -1
  136. package/deps/couchbase-cxx-client/core/transactions/internal/doc_record.hxx +21 -0
  137. package/deps/couchbase-cxx-client/core/transactions/internal/logging.hxx +40 -18
  138. package/deps/couchbase-cxx-client/core/transactions/internal/transaction_context.hxx +19 -14
  139. package/deps/couchbase-cxx-client/core/transactions/internal/transaction_fields.hxx +1 -0
  140. package/deps/couchbase-cxx-client/core/transactions/internal/transactions_cleanup.hxx +7 -1
  141. package/deps/couchbase-cxx-client/core/transactions/result.hxx +26 -0
  142. package/deps/couchbase-cxx-client/core/transactions/staged_mutation.cxx +49 -48
  143. package/deps/couchbase-cxx-client/core/transactions/staged_mutation.hxx +18 -8
  144. package/deps/couchbase-cxx-client/core/transactions/transaction_context.cxx +40 -28
  145. package/deps/couchbase-cxx-client/core/transactions/transaction_get_result.cxx +41 -31
  146. package/deps/couchbase-cxx-client/core/transactions/transaction_get_result.hxx +87 -23
  147. package/deps/couchbase-cxx-client/core/transactions/transaction_links.hxx +37 -2
  148. package/deps/couchbase-cxx-client/core/transactions/transactions.cxx +9 -8
  149. package/deps/couchbase-cxx-client/core/transactions/transactions_cleanup.cxx +182 -200
  150. package/deps/couchbase-cxx-client/core/transactions/waitable_op_list.hxx +8 -7
  151. package/deps/couchbase-cxx-client/core/transactions.hxx +1 -13
  152. package/deps/couchbase-cxx-client/core/utils/binary.hxx +1 -1
  153. package/deps/couchbase-cxx-client/core/utils/connection_string.cxx +25 -3
  154. package/deps/couchbase-cxx-client/core/utils/connection_string.hxx +3 -3
  155. package/deps/couchbase-cxx-client/core/utils/crc32.hxx +3 -2
  156. package/deps/couchbase-cxx-client/core/utils/json.cxx +4 -1
  157. package/deps/couchbase-cxx-client/core/utils/json_streaming_lexer.hxx +2 -1
  158. package/deps/couchbase-cxx-client/core/utils/keyspace.hxx +55 -0
  159. package/deps/couchbase-cxx-client/core/utils/url_codec.cxx +2 -1
  160. package/deps/couchbase-cxx-client/couchbase/analytics_error_context.hxx +143 -0
  161. package/deps/couchbase-cxx-client/couchbase/analytics_meta_data.hxx +155 -0
  162. package/deps/couchbase-cxx-client/couchbase/analytics_metrics.hxx +163 -0
  163. package/deps/couchbase-cxx-client/couchbase/analytics_options.hxx +359 -0
  164. package/deps/couchbase-cxx-client/couchbase/analytics_result.hxx +102 -0
  165. package/deps/couchbase-cxx-client/couchbase/analytics_scan_consistency.hxx +46 -0
  166. package/deps/couchbase-cxx-client/couchbase/analytics_status.hxx +41 -0
  167. package/deps/couchbase-cxx-client/couchbase/analytics_warning.hxx +85 -0
  168. package/deps/couchbase-cxx-client/couchbase/behavior_options.hxx +10 -1
  169. package/deps/couchbase-cxx-client/couchbase/build_query_index_options.hxx +12 -45
  170. package/deps/couchbase-cxx-client/couchbase/cluster.hxx +39 -4
  171. package/deps/couchbase-cxx-client/couchbase/cluster_options.hxx +16 -17
  172. package/deps/couchbase-cxx-client/couchbase/collection.hxx +30 -17
  173. package/deps/couchbase-cxx-client/couchbase/collection_query_index_manager.hxx +218 -0
  174. package/deps/couchbase-cxx-client/couchbase/common_options.hxx +1 -1
  175. package/deps/couchbase-cxx-client/couchbase/configuration_profile.hxx +1 -1
  176. package/deps/couchbase-cxx-client/couchbase/configuration_profiles_registry.hxx +3 -1
  177. package/deps/couchbase-cxx-client/couchbase/create_primary_query_index_options.hxx +166 -0
  178. package/deps/couchbase-cxx-client/couchbase/create_query_index_options.hxx +172 -0
  179. package/deps/couchbase-cxx-client/couchbase/drop_primary_query_index_options.hxx +129 -0
  180. package/deps/couchbase-cxx-client/couchbase/drop_query_index_options.hxx +116 -0
  181. package/deps/couchbase-cxx-client/couchbase/fmt/analytics_status.hxx +76 -0
  182. package/deps/couchbase-cxx-client/couchbase/fmt/cas.hxx +13 -1
  183. package/deps/couchbase-cxx-client/couchbase/fmt/durability_level.hxx +6 -0
  184. package/deps/couchbase-cxx-client/couchbase/fmt/key_value_extended_error_info.hxx +6 -0
  185. package/deps/couchbase-cxx-client/couchbase/fmt/key_value_status_code.hxx +6 -0
  186. package/deps/couchbase-cxx-client/couchbase/fmt/mutation_token.hxx +6 -0
  187. package/deps/couchbase-cxx-client/couchbase/fmt/query_scan_consistency.hxx +52 -0
  188. package/deps/couchbase-cxx-client/couchbase/fmt/query_status.hxx +76 -0
  189. package/deps/couchbase-cxx-client/couchbase/fmt/retry_reason.hxx +6 -0
  190. package/deps/couchbase-cxx-client/couchbase/fmt/tls_verify_mode.hxx +52 -0
  191. package/deps/couchbase-cxx-client/couchbase/get_all_query_indexes_options.hxx +101 -0
  192. package/deps/couchbase-cxx-client/couchbase/management/query_index.hxx +39 -0
  193. package/deps/couchbase-cxx-client/couchbase/metrics/meter.hxx +16 -0
  194. package/deps/couchbase-cxx-client/couchbase/query_index_manager.hxx +180 -6
  195. package/deps/couchbase-cxx-client/couchbase/query_options.hxx +1 -19
  196. package/deps/couchbase-cxx-client/couchbase/scope.hxx +40 -3
  197. package/deps/couchbase-cxx-client/couchbase/subdoc/array_add_unique.hxx +2 -0
  198. package/deps/couchbase-cxx-client/couchbase/subdoc/array_append.hxx +2 -0
  199. package/deps/couchbase-cxx-client/couchbase/subdoc/array_insert.hxx +2 -0
  200. package/deps/couchbase-cxx-client/couchbase/subdoc/array_prepend.hxx +2 -0
  201. package/deps/couchbase-cxx-client/couchbase/subdoc/count.hxx +2 -0
  202. package/deps/couchbase-cxx-client/couchbase/subdoc/counter.hxx +2 -0
  203. package/deps/couchbase-cxx-client/couchbase/subdoc/exists.hxx +2 -0
  204. package/deps/couchbase-cxx-client/couchbase/subdoc/get.hxx +2 -0
  205. package/deps/couchbase-cxx-client/couchbase/subdoc/insert.hxx +2 -0
  206. package/deps/couchbase-cxx-client/couchbase/subdoc/remove.hxx +2 -0
  207. package/deps/couchbase-cxx-client/couchbase/subdoc/replace.hxx +3 -1
  208. package/deps/couchbase-cxx-client/couchbase/subdoc/upsert.hxx +2 -0
  209. package/deps/couchbase-cxx-client/couchbase/tracing/request_span.hxx +63 -0
  210. package/deps/couchbase-cxx-client/couchbase/tracing/request_tracer.hxx +18 -40
  211. package/deps/couchbase-cxx-client/couchbase/transaction_op_error_context.hxx +4 -4
  212. package/deps/couchbase-cxx-client/couchbase/transactions/async_attempt_context.hxx +102 -16
  213. package/deps/couchbase-cxx-client/couchbase/transactions/attempt_context.hxx +90 -15
  214. package/deps/couchbase-cxx-client/couchbase/transactions/transaction_get_result.hxx +55 -35
  215. package/deps/couchbase-cxx-client/couchbase/transactions/transaction_keyspace.hxx +27 -1
  216. package/deps/couchbase-cxx-client/couchbase/transactions/transaction_options.hxx +79 -8
  217. package/deps/couchbase-cxx-client/couchbase/transactions/transaction_query_options.hxx +127 -21
  218. package/deps/couchbase-cxx-client/couchbase/transactions/transaction_query_result.hxx +6 -21
  219. package/deps/couchbase-cxx-client/couchbase/transactions/transaction_result.hxx +0 -1
  220. package/deps/couchbase-cxx-client/couchbase/transactions/transactions_cleanup_config.hxx +5 -3
  221. package/deps/couchbase-cxx-client/couchbase/transactions/transactions_config.hxx +9 -5
  222. package/deps/couchbase-cxx-client/couchbase/transactions/transactions_query_config.hxx +6 -3
  223. package/deps/couchbase-cxx-client/couchbase/transactions.hxx +36 -2
  224. package/deps/couchbase-cxx-client/couchbase/watch_query_indexes_options.hxx +115 -0
  225. package/deps/couchbase-cxx-client/docs/Doxyfile.in +324 -223
  226. package/deps/couchbase-cxx-client/docs/cbc-analytics.md +171 -0
  227. package/deps/couchbase-cxx-client/docs/cbc-get.md +160 -0
  228. package/deps/couchbase-cxx-client/docs/cbc-pillowfight.md +163 -0
  229. package/deps/couchbase-cxx-client/docs/cbc-query.md +179 -0
  230. package/deps/couchbase-cxx-client/docs/cbc.md +46 -0
  231. package/deps/couchbase-cxx-client/docs/cli.hxx +33 -0
  232. package/deps/couchbase-cxx-client/docs/doxygen-awesome.css +474 -89
  233. package/deps/couchbase-cxx-client/docs/mainpage.hxx +9 -8
  234. package/deps/couchbase-cxx-client/docs/stability.hxx +15 -0
  235. package/deps/couchbase-cxx-client/examples/async_game_server.cxx +56 -54
  236. package/deps/couchbase-cxx-client/examples/distributed_mutex.cxx +2 -0
  237. package/deps/couchbase-cxx-client/examples/game_server.cxx +9 -10
  238. package/deps/couchbase-cxx-client/examples/minimal.cxx +3 -1
  239. package/deps/couchbase-cxx-client/test/CMakeLists.txt +9 -7
  240. package/deps/couchbase-cxx-client/test/benchmark_helper_integration.hxx +2 -2
  241. package/deps/couchbase-cxx-client/test/data/search_beers_dataset.json +70 -0
  242. package/deps/couchbase-cxx-client/test/data/search_beers_index_params.json +108 -0
  243. package/deps/couchbase-cxx-client/test/test_helper.hxx +6 -6
  244. package/deps/couchbase-cxx-client/test/test_integration_analytics.cxx +289 -13
  245. package/deps/couchbase-cxx-client/test/test_integration_crud.cxx +80 -1
  246. package/deps/couchbase-cxx-client/test/test_integration_diagnostics.cxx +3 -3
  247. package/deps/couchbase-cxx-client/test/test_integration_examples.cxx +182 -0
  248. package/deps/couchbase-cxx-client/test/test_integration_management.cxx +752 -319
  249. package/deps/couchbase-cxx-client/test/test_integration_query.cxx +5 -9
  250. package/deps/couchbase-cxx-client/test/test_integration_search.cxx +603 -0
  251. package/deps/couchbase-cxx-client/test/test_integration_subdoc.cxx +2 -2
  252. package/deps/couchbase-cxx-client/test/test_integration_tracer.cxx +2 -0
  253. package/deps/couchbase-cxx-client/test/test_integration_transcoders.cxx +23 -5
  254. package/deps/couchbase-cxx-client/test/test_transaction_context.cxx +550 -0
  255. package/deps/couchbase-cxx-client/test/test_transaction_examples.cxx +180 -0
  256. package/deps/couchbase-cxx-client/test/test_transaction_public_async_api.cxx +393 -0
  257. package/deps/couchbase-cxx-client/test/test_transaction_public_blocking_api.cxx +653 -0
  258. package/deps/couchbase-cxx-client/test/test_transaction_simple.cxx +984 -0
  259. package/deps/couchbase-cxx-client/test/test_transaction_simple_async.cxx +970 -0
  260. package/deps/couchbase-cxx-client/test/test_unit_config_profiles.cxx +13 -13
  261. package/deps/couchbase-cxx-client/test/test_unit_connection_string.cxx +35 -0
  262. package/deps/couchbase-cxx-client/test/test_unit_json_transcoder.cxx +4 -0
  263. package/deps/couchbase-cxx-client/test/test_unit_transaction_logging.cxx +66 -22
  264. package/deps/couchbase-cxx-client/test/test_unit_transaction_utils.cxx +113 -0
  265. package/deps/couchbase-cxx-client/test/test_unit_utils.cxx +59 -4
  266. package/deps/couchbase-cxx-client/test/utils/CMakeLists.txt +13 -9
  267. package/deps/couchbase-cxx-client/test/utils/integration_shortcuts.hxx +3 -3
  268. package/deps/couchbase-cxx-client/test/utils/integration_test_guard.cxx +21 -9
  269. package/deps/couchbase-cxx-client/test/utils/server_version.hxx +10 -0
  270. package/deps/couchbase-cxx-client/test/utils/test_data.cxx +41 -0
  271. package/deps/couchbase-cxx-client/test/utils/test_data.hxx +29 -0
  272. package/deps/couchbase-cxx-client/test/utils/wait_until.cxx +65 -4
  273. package/deps/couchbase-cxx-client/test/utils/wait_until.hxx +8 -1
  274. package/deps/couchbase-cxx-client/third_party/catch2/.bazelrc +10 -0
  275. package/deps/couchbase-cxx-client/third_party/catch2/.conan/build.py +4 -4
  276. package/deps/couchbase-cxx-client/third_party/catch2/.conan/test_package/CMakeLists.txt +5 -4
  277. package/deps/couchbase-cxx-client/third_party/catch2/.conan/test_package/conanfile.py +3 -2
  278. package/deps/couchbase-cxx-client/third_party/catch2/.conan/test_package/test_package.cpp +1 -3
  279. package/deps/couchbase-cxx-client/third_party/catch2/.github/FUNDING.yml +1 -0
  280. package/deps/couchbase-cxx-client/third_party/catch2/.github/workflows/linux-bazel-builds.yml +24 -0
  281. package/deps/couchbase-cxx-client/third_party/catch2/.github/workflows/linux-meson-builds.yml +43 -0
  282. package/deps/couchbase-cxx-client/third_party/catch2/.github/workflows/linux-other-builds.yml +104 -0
  283. package/deps/couchbase-cxx-client/third_party/catch2/.github/workflows/linux-simple-builds.yml +122 -0
  284. package/deps/couchbase-cxx-client/third_party/catch2/.github/workflows/mac-builds.yml +52 -0
  285. package/deps/couchbase-cxx-client/third_party/catch2/.github/workflows/validate-header-guards.yml +36 -0
  286. package/deps/couchbase-cxx-client/third_party/catch2/.github/workflows/windows-simple-builds.yml +37 -0
  287. package/deps/couchbase-cxx-client/third_party/catch2/BUILD.bazel +83 -8
  288. package/deps/couchbase-cxx-client/third_party/catch2/CMake/CatchConfigOptions.cmake +79 -0
  289. package/deps/couchbase-cxx-client/third_party/catch2/CMake/CatchMiscFunctions.cmake +120 -0
  290. package/deps/couchbase-cxx-client/third_party/catch2/CMake/catch2-with-main.pc.in +10 -0
  291. package/deps/couchbase-cxx-client/third_party/catch2/CMake/catch2.pc.in +5 -1
  292. package/deps/couchbase-cxx-client/third_party/catch2/CMakeLists.txt +98 -152
  293. package/deps/couchbase-cxx-client/third_party/catch2/CMakePresets.json +25 -0
  294. package/deps/couchbase-cxx-client/third_party/catch2/Doxyfile +2484 -0
  295. package/deps/couchbase-cxx-client/third_party/catch2/README.md +83 -17
  296. package/deps/couchbase-cxx-client/third_party/catch2/SECURITY.md +19 -0
  297. package/deps/couchbase-cxx-client/third_party/catch2/WORKSPACE.bazel +16 -0
  298. package/deps/couchbase-cxx-client/third_party/catch2/appveyor.yml +55 -73
  299. package/deps/couchbase-cxx-client/third_party/catch2/codecov.yml +3 -6
  300. package/deps/couchbase-cxx-client/third_party/catch2/conanfile.py +44 -14
  301. package/deps/couchbase-cxx-client/third_party/catch2/data/artwork/catch2-logo-small-with-background.png +0 -0
  302. package/deps/couchbase-cxx-client/third_party/catch2/docs/Readme.md +18 -16
  303. package/deps/couchbase-cxx-client/third_party/catch2/docs/assertions.md +45 -64
  304. package/deps/couchbase-cxx-client/third_party/catch2/docs/benchmarks.md +3 -6
  305. package/deps/couchbase-cxx-client/third_party/catch2/docs/ci-and-misc.md +27 -29
  306. package/deps/couchbase-cxx-client/third_party/catch2/docs/cmake-integration.md +157 -35
  307. package/deps/couchbase-cxx-client/third_party/catch2/docs/command-line.md +232 -65
  308. package/deps/couchbase-cxx-client/third_party/catch2/docs/commercial-users.md +14 -13
  309. package/deps/couchbase-cxx-client/third_party/catch2/docs/comparing-floating-point-numbers.md +192 -0
  310. package/deps/couchbase-cxx-client/third_party/catch2/docs/configuration.md +48 -54
  311. package/deps/couchbase-cxx-client/third_party/catch2/docs/contributing.md +150 -38
  312. package/deps/couchbase-cxx-client/third_party/catch2/docs/deprecations.md +14 -118
  313. package/deps/couchbase-cxx-client/third_party/catch2/docs/event-listeners.md +31 -62
  314. package/deps/couchbase-cxx-client/third_party/catch2/docs/faq.md +94 -0
  315. package/deps/couchbase-cxx-client/third_party/catch2/docs/generators.md +14 -10
  316. package/deps/couchbase-cxx-client/third_party/catch2/docs/limitations.md +34 -36
  317. package/deps/couchbase-cxx-client/third_party/catch2/docs/list-of-examples.md +0 -3
  318. package/deps/couchbase-cxx-client/third_party/catch2/docs/logging.md +2 -2
  319. package/deps/couchbase-cxx-client/third_party/catch2/docs/matchers.md +355 -122
  320. package/deps/couchbase-cxx-client/third_party/catch2/docs/migrate-v2-to-v3.md +98 -0
  321. package/deps/couchbase-cxx-client/third_party/catch2/docs/opensource-users.md +43 -13
  322. package/deps/couchbase-cxx-client/third_party/catch2/docs/other-macros.md +19 -18
  323. package/deps/couchbase-cxx-client/third_party/catch2/docs/own-main.md +50 -49
  324. package/deps/couchbase-cxx-client/third_party/catch2/docs/release-notes.md +375 -6
  325. package/deps/couchbase-cxx-client/third_party/catch2/docs/release-process.md +9 -16
  326. package/deps/couchbase-cxx-client/third_party/catch2/docs/reporter-events.md +175 -0
  327. package/deps/couchbase-cxx-client/third_party/catch2/docs/reporters.md +191 -25
  328. package/deps/couchbase-cxx-client/third_party/catch2/docs/skipping-passing-failing.md +129 -0
  329. package/deps/couchbase-cxx-client/third_party/catch2/docs/test-cases-and-sections.md +91 -20
  330. package/deps/couchbase-cxx-client/third_party/catch2/docs/test-fixtures.md +28 -9
  331. package/deps/couchbase-cxx-client/third_party/catch2/docs/tostring.md +3 -3
  332. package/deps/couchbase-cxx-client/third_party/catch2/docs/tutorial.md +87 -139
  333. package/deps/couchbase-cxx-client/third_party/catch2/docs/usage-tips.md +100 -0
  334. package/deps/couchbase-cxx-client/third_party/catch2/docs/why-catch.md +24 -11
  335. package/deps/couchbase-cxx-client/third_party/catch2/examples/010-TestCase.cpp +4 -7
  336. package/deps/couchbase-cxx-client/third_party/catch2/examples/020-TestCase-1.cpp +3 -9
  337. package/deps/couchbase-cxx-client/third_party/catch2/examples/020-TestCase-2.cpp +2 -2
  338. package/deps/couchbase-cxx-client/third_party/catch2/examples/030-Asn-Require-Check.cpp +5 -5
  339. package/deps/couchbase-cxx-client/third_party/catch2/examples/100-Fix-Section.cpp +5 -4
  340. package/deps/couchbase-cxx-client/third_party/catch2/examples/110-Fix-ClassFixture.cpp +7 -4
  341. package/deps/couchbase-cxx-client/third_party/catch2/examples/120-Bdd-ScenarioGivenWhenThen.cpp +4 -4
  342. package/deps/couchbase-cxx-client/third_party/catch2/examples/210-Evt-EventListeners.cpp +51 -44
  343. package/deps/couchbase-cxx-client/third_party/catch2/examples/231-Cfg-OutputStreams.cpp +3 -4
  344. package/deps/couchbase-cxx-client/third_party/catch2/examples/300-Gen-OwnGenerator.cpp +13 -3
  345. package/deps/couchbase-cxx-client/third_party/catch2/examples/301-Gen-MapTypeConversion.cpp +9 -7
  346. package/deps/couchbase-cxx-client/third_party/catch2/examples/302-Gen-Table.cpp +4 -3
  347. package/deps/couchbase-cxx-client/third_party/catch2/examples/310-Gen-VariablesInGenerators.cpp +3 -1
  348. package/deps/couchbase-cxx-client/third_party/catch2/examples/311-Gen-CustomCapture.cpp +3 -1
  349. package/deps/couchbase-cxx-client/third_party/catch2/examples/CMakeLists.txt +29 -126
  350. package/deps/couchbase-cxx-client/third_party/catch2/extras/Catch.cmake +279 -0
  351. package/deps/couchbase-cxx-client/third_party/catch2/extras/CatchAddTests.cmake +187 -0
  352. package/deps/couchbase-cxx-client/third_party/catch2/extras/CatchShardTests.cmake +74 -0
  353. package/deps/couchbase-cxx-client/third_party/catch2/extras/CatchShardTestsImpl.cmake +52 -0
  354. package/deps/couchbase-cxx-client/third_party/catch2/extras/catch_amalgamated.cpp +10655 -0
  355. package/deps/couchbase-cxx-client/third_party/catch2/extras/catch_amalgamated.hpp +12972 -0
  356. package/deps/couchbase-cxx-client/third_party/catch2/fuzzing/CMakeLists.txt +20 -0
  357. package/deps/couchbase-cxx-client/third_party/catch2/fuzzing/NullOStream.cpp +10 -0
  358. package/deps/couchbase-cxx-client/third_party/catch2/fuzzing/NullOStream.h +20 -0
  359. package/deps/couchbase-cxx-client/third_party/catch2/fuzzing/build_fuzzers.sh +33 -0
  360. package/deps/couchbase-cxx-client/third_party/catch2/fuzzing/fuzz_TestSpecParser.cpp +16 -0
  361. package/deps/couchbase-cxx-client/third_party/catch2/fuzzing/fuzz_XmlWriter.cpp +16 -0
  362. package/deps/couchbase-cxx-client/third_party/catch2/fuzzing/fuzz_textflow.cpp +47 -0
  363. package/deps/couchbase-cxx-client/third_party/catch2/mdsnippets.json +9 -0
  364. package/deps/couchbase-cxx-client/third_party/catch2/meson.build +17 -0
  365. package/deps/couchbase-cxx-client/third_party/catch2/src/CMakeLists.txt +510 -0
  366. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/benchmark/catch_benchmark.hpp +147 -0
  367. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/benchmark/catch_benchmark_all.hpp +46 -0
  368. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/benchmark/catch_chronometer.cpp +17 -0
  369. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/benchmark/catch_chronometer.hpp +74 -0
  370. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/benchmark/catch_clock.hpp +39 -0
  371. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/benchmark/catch_constructor.hpp +82 -0
  372. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/benchmark/catch_environment.hpp +37 -0
  373. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/benchmark/catch_estimate.hpp +30 -0
  374. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/benchmark/catch_execution_plan.hpp +58 -0
  375. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/benchmark/catch_optimizer.hpp +78 -0
  376. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/benchmark/catch_outlier_classification.hpp +29 -0
  377. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/benchmark/catch_sample_analysis.hpp +49 -0
  378. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/benchmark/detail/catch_analyse.hpp +79 -0
  379. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/benchmark/detail/catch_benchmark_function.cpp +17 -0
  380. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/benchmark/detail/catch_benchmark_function.hpp +107 -0
  381. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/benchmark/detail/catch_benchmark_stats.hpp +64 -0
  382. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/benchmark/detail/catch_benchmark_stats_fwd.hpp +23 -0
  383. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/benchmark/detail/catch_complete_invoke.hpp +58 -0
  384. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/benchmark/detail/catch_estimate_clock.hpp +121 -0
  385. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/benchmark/detail/catch_measure.hpp +32 -0
  386. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/benchmark/detail/catch_repeat.hpp +36 -0
  387. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/benchmark/detail/catch_run_for_at_least.cpp +31 -0
  388. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/benchmark/detail/catch_run_for_at_least.hpp +65 -0
  389. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/benchmark/detail/catch_stats.cpp +257 -0
  390. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/benchmark/detail/catch_stats.hpp +144 -0
  391. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/benchmark/detail/catch_timing.hpp +31 -0
  392. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/catch_all.hpp +127 -0
  393. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/catch_approx.cpp +85 -0
  394. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/catch_approx.hpp +128 -0
  395. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/catch_assertion_info.hpp +28 -0
  396. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/catch_assertion_result.cpp +105 -0
  397. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/catch_assertion_result.hpp +60 -0
  398. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/catch_config.cpp +247 -0
  399. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/catch_config.hpp +153 -0
  400. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/catch_get_random_seed.cpp +18 -0
  401. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/catch_get_random_seed.hpp +18 -0
  402. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/catch_message.cpp +116 -0
  403. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/catch_message.hpp +148 -0
  404. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/catch_registry_hub.cpp +105 -0
  405. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/catch_section_info.hpp +42 -0
  406. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/catch_session.cpp +363 -0
  407. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/catch_session.hpp +62 -0
  408. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/catch_tag_alias.hpp +29 -0
  409. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/catch_tag_alias_autoregistrar.cpp +24 -0
  410. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/catch_tag_alias_autoregistrar.hpp +29 -0
  411. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/catch_template_test_macros.hpp +124 -0
  412. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/catch_test_case_info.cpp +247 -0
  413. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/catch_test_case_info.hpp +131 -0
  414. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/catch_test_macros.hpp +226 -0
  415. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/catch_test_spec.cpp +138 -0
  416. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/catch_test_spec.hpp +119 -0
  417. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/catch_timer.cpp +37 -0
  418. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/catch_timer.hpp +27 -0
  419. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/catch_tostring.cpp +254 -0
  420. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/catch_tostring.hpp +668 -0
  421. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/catch_totals.cpp +65 -0
  422. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/catch_totals.hpp +41 -0
  423. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/catch_translate_exception.cpp +20 -0
  424. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/catch_translate_exception.hpp +88 -0
  425. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/catch_user_config.hpp.in +210 -0
  426. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/catch_version.cpp +43 -0
  427. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/catch_version.hpp +39 -0
  428. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/catch_version_macros.hpp +15 -0
  429. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/generators/catch_generator_exception.cpp +17 -0
  430. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/generators/catch_generator_exception.hpp +31 -0
  431. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/generators/catch_generators.cpp +42 -0
  432. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/generators/catch_generators.hpp +250 -0
  433. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/generators/catch_generators_adapters.hpp +241 -0
  434. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/generators/catch_generators_all.hpp +30 -0
  435. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/generators/catch_generators_random.cpp +13 -0
  436. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/generators/catch_generators_random.hpp +98 -0
  437. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/generators/catch_generators_range.hpp +110 -0
  438. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/interfaces/catch_interfaces_all.hpp +37 -0
  439. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/interfaces/catch_interfaces_capture.cpp +13 -0
  440. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/interfaces/catch_interfaces_capture.hpp +109 -0
  441. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/interfaces/catch_interfaces_config.cpp +13 -0
  442. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/interfaces/catch_interfaces_config.hpp +100 -0
  443. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/interfaces/catch_interfaces_enum_values_registry.hpp +47 -0
  444. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/interfaces/catch_interfaces_exception.cpp +14 -0
  445. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/interfaces/catch_interfaces_exception.hpp +36 -0
  446. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/interfaces/catch_interfaces_generatortracker.cpp +32 -0
  447. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/interfaces/catch_interfaces_generatortracker.hpp +90 -0
  448. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/interfaces/catch_interfaces_registry_hub.cpp +14 -0
  449. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/interfaces/catch_interfaces_registry_hub.hpp +66 -0
  450. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/interfaces/catch_interfaces_reporter.cpp +101 -0
  451. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/interfaces/catch_interfaces_reporter.hpp +224 -0
  452. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/interfaces/catch_interfaces_reporter_factory.cpp +14 -0
  453. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/interfaces/catch_interfaces_reporter_factory.hpp +45 -0
  454. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/interfaces/catch_interfaces_tag_alias_registry.hpp +29 -0
  455. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/interfaces/catch_interfaces_test_invoker.hpp +21 -0
  456. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/interfaces/catch_interfaces_testcase.cpp +13 -0
  457. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/interfaces/catch_interfaces_testcase.hpp +36 -0
  458. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_assertion_handler.cpp +82 -0
  459. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_assertion_handler.hpp +68 -0
  460. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_case_insensitive_comparisons.cpp +35 -0
  461. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_case_insensitive_comparisons.hpp +30 -0
  462. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_case_sensitive.hpp +17 -0
  463. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_clara.cpp +448 -0
  464. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_clara.hpp +702 -0
  465. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_commandline.cpp +313 -0
  466. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_commandline.hpp +21 -0
  467. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_compare_traits.hpp +75 -0
  468. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_compiler_capabilities.hpp +430 -0
  469. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_config_android_logwrite.hpp +33 -0
  470. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_config_counter.hpp +32 -0
  471. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_config_uncaught_exceptions.hpp +44 -0
  472. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_config_wchar.hpp +33 -0
  473. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_console_colour.cpp +282 -0
  474. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_console_colour.hpp +141 -0
  475. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_console_width.hpp +19 -0
  476. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_container_nonmembers.hpp +73 -0
  477. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_context.cpp +41 -0
  478. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_context.hpp +51 -0
  479. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_debug_console.cpp +45 -0
  480. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_debug_console.hpp +17 -0
  481. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_debugger.cpp +120 -0
  482. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_debugger.hpp +67 -0
  483. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_decomposer.cpp +23 -0
  484. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_decomposer.hpp +340 -0
  485. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_enforce.cpp +41 -0
  486. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_enforce.hpp +54 -0
  487. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_enum_values_registry.cpp +73 -0
  488. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_enum_values_registry.hpp +36 -0
  489. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_errno_guard.cpp +16 -0
  490. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_errno_guard.hpp +27 -0
  491. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_exception_translator_registry.cpp +84 -0
  492. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_exception_translator_registry.hpp +30 -0
  493. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_fatal_condition_handler.cpp +243 -0
  494. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_fatal_condition_handler.hpp +69 -0
  495. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_floating_point_helpers.cpp +32 -0
  496. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_floating_point_helpers.hpp +103 -0
  497. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_getenv.cpp +37 -0
  498. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_getenv.hpp +20 -0
  499. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_is_permutation.hpp +138 -0
  500. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_istream.cpp +159 -0
  501. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_istream.hpp +54 -0
  502. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_lazy_expr.cpp +29 -0
  503. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_lazy_expr.hpp +40 -0
  504. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_leak_detector.cpp +38 -0
  505. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_leak_detector.hpp +19 -0
  506. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_list.cpp +123 -0
  507. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_list.hpp +43 -0
  508. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_logical_traits.hpp +44 -0
  509. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_main.cpp +39 -0
  510. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_message_info.cpp +25 -0
  511. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_message_info.hpp +42 -0
  512. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_meta.hpp +47 -0
  513. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_move_and_forward.hpp +19 -0
  514. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_noncopyable.hpp +28 -0
  515. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_optional.hpp +100 -0
  516. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_output_redirect.cpp +146 -0
  517. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_output_redirect.hpp +118 -0
  518. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_parse_numbers.cpp +52 -0
  519. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_parse_numbers.hpp +26 -0
  520. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_platform.hpp +37 -0
  521. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_polyfills.cpp +34 -0
  522. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_polyfills.hpp +16 -0
  523. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_preprocessor.hpp +237 -0
  524. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_preprocessor_remove_parens.hpp +19 -0
  525. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_random_number_generator.cpp +70 -0
  526. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_random_number_generator.hpp +59 -0
  527. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_random_seed_generation.cpp +34 -0
  528. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_random_seed_generation.hpp +26 -0
  529. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_reporter_registry.cpp +88 -0
  530. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_reporter_registry.hpp +55 -0
  531. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_reporter_spec_parser.cpp +173 -0
  532. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_reporter_spec_parser.hpp +85 -0
  533. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_result_type.cpp +26 -0
  534. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_result_type.hpp +57 -0
  535. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_reusable_string_stream.cpp +62 -0
  536. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_reusable_string_stream.hpp +57 -0
  537. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_run_context.cpp +688 -0
  538. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_run_context.hpp +160 -0
  539. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_section.cpp +60 -0
  540. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_section.hpp +53 -0
  541. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_sharding.hpp +42 -0
  542. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_singletons.cpp +36 -0
  543. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_singletons.hpp +45 -0
  544. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_source_line_info.cpp +33 -0
  545. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_source_line_info.hpp +37 -0
  546. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_startup_exception_registry.cpp +29 -0
  547. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_startup_exception_registry.hpp +29 -0
  548. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_stdstreams.cpp +24 -0
  549. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_stdstreams.hpp +22 -0
  550. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_stream_end_stop.hpp +30 -0
  551. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_string_manip.cpp +104 -0
  552. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_string_manip.hpp +61 -0
  553. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_stringref.cpp +66 -0
  554. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_stringref.hpp +121 -0
  555. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_tag_alias_registry.cpp +55 -0
  556. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_tag_alias_registry.hpp +33 -0
  557. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_template_test_registry.hpp +337 -0
  558. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_test_case_info_hasher.cpp +39 -0
  559. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_test_case_info_hasher.hpp +29 -0
  560. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_test_case_registry_impl.cpp +146 -0
  561. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_test_case_registry_impl.hpp +62 -0
  562. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_test_case_tracker.cpp +239 -0
  563. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_test_case_tracker.hpp +244 -0
  564. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_test_failure_exception.cpp +31 -0
  565. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_test_failure_exception.hpp +34 -0
  566. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_test_macro_impl.hpp +159 -0
  567. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_test_registry.cpp +82 -0
  568. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_test_registry.hpp +132 -0
  569. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_test_run_info.hpp +22 -0
  570. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_test_spec_parser.cpp +239 -0
  571. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_test_spec_parser.hpp +81 -0
  572. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_textflow.cpp +255 -0
  573. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_textflow.hpp +169 -0
  574. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_to_string.hpp +29 -0
  575. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_uncaught_exceptions.cpp +26 -0
  576. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_uncaught_exceptions.hpp +15 -0
  577. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_unique_name.hpp +20 -0
  578. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_unique_ptr.hpp +118 -0
  579. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_void_type.hpp +25 -0
  580. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_wildcard_pattern.cpp +47 -0
  581. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_wildcard_pattern.hpp +38 -0
  582. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_windows_h_proxy.hpp +28 -0
  583. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_xmlwriter.cpp +348 -0
  584. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_xmlwriter.hpp +152 -0
  585. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/matchers/catch_matchers.cpp +25 -0
  586. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/matchers/catch_matchers.hpp +237 -0
  587. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/matchers/catch_matchers_all.hpp +36 -0
  588. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/matchers/catch_matchers_container_properties.cpp +34 -0
  589. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/matchers/catch_matchers_container_properties.hpp +90 -0
  590. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/matchers/catch_matchers_contains.hpp +102 -0
  591. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/matchers/catch_matchers_exception.cpp +26 -0
  592. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/matchers/catch_matchers_exception.hpp +61 -0
  593. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/matchers/catch_matchers_floating_point.cpp +241 -0
  594. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/matchers/catch_matchers_floating_point.hpp +94 -0
  595. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/matchers/catch_matchers_predicate.cpp +17 -0
  596. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/matchers/catch_matchers_predicate.hpp +59 -0
  597. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/matchers/catch_matchers_quantifiers.cpp +24 -0
  598. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/matchers/catch_matchers_quantifiers.hpp +165 -0
  599. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/matchers/catch_matchers_range_equals.hpp +144 -0
  600. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/matchers/catch_matchers_string.cpp +114 -0
  601. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/matchers/catch_matchers_string.hpp +85 -0
  602. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/matchers/catch_matchers_templated.cpp +41 -0
  603. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/matchers/catch_matchers_templated.hpp +296 -0
  604. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/matchers/catch_matchers_vector.hpp +194 -0
  605. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/matchers/internal/catch_matchers_impl.cpp +25 -0
  606. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/matchers/internal/catch_matchers_impl.hpp +83 -0
  607. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/meson.build +368 -0
  608. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/reporters/catch_reporter_automake.cpp +37 -0
  609. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/reporters/catch_reporter_automake.hpp +38 -0
  610. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/reporters/catch_reporter_common_base.cpp +49 -0
  611. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/reporters/catch_reporter_common_base.hpp +79 -0
  612. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/reporters/catch_reporter_compact.cpp +254 -0
  613. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/reporters/catch_reporter_compact.hpp +39 -0
  614. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/reporters/catch_reporter_console.cpp +656 -0
  615. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/reporters/catch_reporter_console.hpp +67 -0
  616. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/reporters/catch_reporter_cumulative_base.cpp +159 -0
  617. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/reporters/catch_reporter_cumulative_base.hpp +151 -0
  618. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/reporters/catch_reporter_event_listener.cpp +40 -0
  619. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/reporters/catch_reporter_event_listener.hpp +60 -0
  620. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/reporters/catch_reporter_helpers.cpp +343 -0
  621. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/reporters/catch_reporter_helpers.hpp +95 -0
  622. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/reporters/catch_reporter_junit.cpp +309 -0
  623. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/reporters/catch_reporter_junit.hpp +58 -0
  624. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/reporters/catch_reporter_multi.cpp +197 -0
  625. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/reporters/catch_reporter_multi.hpp +72 -0
  626. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/reporters/catch_reporter_registrars.cpp +36 -0
  627. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/reporters/catch_reporter_registrars.hpp +131 -0
  628. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/reporters/catch_reporter_sonarqube.cpp +162 -0
  629. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/reporters/catch_reporter_sonarqube.hpp +61 -0
  630. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/reporters/catch_reporter_streaming_base.cpp +23 -0
  631. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/reporters/catch_reporter_streaming_base.hpp +73 -0
  632. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/reporters/catch_reporter_tap.cpp +229 -0
  633. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/reporters/catch_reporter_tap.hpp +43 -0
  634. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/reporters/catch_reporter_teamcity.cpp +177 -0
  635. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/reporters/catch_reporter_teamcity.hpp +66 -0
  636. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/reporters/catch_reporter_xml.cpp +336 -0
  637. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/reporters/catch_reporter_xml.hpp +66 -0
  638. package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/reporters/catch_reporters_all.hpp +40 -0
  639. package/deps/couchbase-cxx-client/third_party/catch2/tests/CMakeLists.txt +665 -0
  640. package/deps/couchbase-cxx-client/third_party/catch2/tests/ExtraTests/CMakeLists.txt +554 -0
  641. package/deps/couchbase-cxx-client/third_party/catch2/tests/ExtraTests/ToDo.txt +10 -0
  642. package/deps/couchbase-cxx-client/third_party/catch2/tests/ExtraTests/X01-PrefixedMacros.cpp +97 -0
  643. package/deps/couchbase-cxx-client/third_party/catch2/tests/ExtraTests/X02-DisabledMacros.cpp +65 -0
  644. package/deps/couchbase-cxx-client/third_party/catch2/tests/ExtraTests/X03-DisabledExceptions-DefaultHandler.cpp +39 -0
  645. package/deps/couchbase-cxx-client/third_party/catch2/tests/ExtraTests/X04-DisabledExceptions-CustomHandler.cpp +40 -0
  646. package/deps/couchbase-cxx-client/third_party/catch2/tests/ExtraTests/X05-DeferredStaticChecks.cpp +21 -0
  647. package/deps/couchbase-cxx-client/third_party/catch2/tests/ExtraTests/X10-FallbackStringifier.cpp +35 -0
  648. package/deps/couchbase-cxx-client/third_party/catch2/tests/ExtraTests/X11-DisableStringification.cpp +27 -0
  649. package/deps/couchbase-cxx-client/third_party/catch2/tests/ExtraTests/X12-CustomDebugBreakMacro.cpp +26 -0
  650. package/deps/couchbase-cxx-client/third_party/catch2/tests/ExtraTests/X21-PartialTestCaseEvents.cpp +74 -0
  651. package/deps/couchbase-cxx-client/third_party/catch2/tests/ExtraTests/X22-BenchmarksInCumulativeReporter.cpp +79 -0
  652. package/deps/couchbase-cxx-client/third_party/catch2/tests/ExtraTests/X23-CasingInReporterNames.cpp +41 -0
  653. package/deps/couchbase-cxx-client/third_party/catch2/tests/ExtraTests/X24-ListenerStdoutCaptureInMultireporter.cpp +40 -0
  654. package/deps/couchbase-cxx-client/third_party/catch2/tests/ExtraTests/X25-ListenerCanAskForCapturedStdout.cpp +47 -0
  655. package/deps/couchbase-cxx-client/third_party/catch2/tests/ExtraTests/X26-ReporterPreferencesForPassingAssertionsIsRespected.cpp +52 -0
  656. package/deps/couchbase-cxx-client/third_party/catch2/tests/ExtraTests/X27-CapturedStdoutInTestCaseEvents.cpp +82 -0
  657. package/deps/couchbase-cxx-client/third_party/catch2/tests/ExtraTests/X28-ListenersGetEventsBeforeReporters.cpp +99 -0
  658. package/deps/couchbase-cxx-client/third_party/catch2/tests/ExtraTests/X29-CustomArgumentsForReporters.cpp +59 -0
  659. package/deps/couchbase-cxx-client/third_party/catch2/tests/ExtraTests/X30-BazelReporter.cpp +17 -0
  660. package/deps/couchbase-cxx-client/third_party/catch2/tests/ExtraTests/X31-DuplicatedTestCases.cpp +16 -0
  661. package/deps/couchbase-cxx-client/third_party/catch2/tests/ExtraTests/X32-DuplicatedTestCasesDifferentTags.cpp +17 -0
  662. package/deps/couchbase-cxx-client/third_party/catch2/tests/ExtraTests/X33-DuplicatedTestCaseMethods.cpp +22 -0
  663. package/deps/couchbase-cxx-client/third_party/catch2/tests/ExtraTests/X34-DuplicatedTestCaseMethodsDifferentFixtures.cpp +27 -0
  664. package/deps/couchbase-cxx-client/third_party/catch2/tests/ExtraTests/X35-DuplicatedReporterNames.cpp +31 -0
  665. package/deps/couchbase-cxx-client/third_party/catch2/tests/ExtraTests/X90-WindowsHeaderInclusion.cpp +21 -0
  666. package/deps/couchbase-cxx-client/third_party/catch2/tests/ExtraTests/X91-AmalgamatedCatch.cpp +38 -0
  667. package/deps/couchbase-cxx-client/third_party/catch2/tests/ExtraTests/X92-NoTests.cpp +11 -0
  668. package/deps/couchbase-cxx-client/third_party/catch2/tests/ExtraTests/X93-AllSkipped.cpp +16 -0
  669. package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/Baselines/automake.sw.approved.txt +420 -0
  670. package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/Baselines/automake.sw.multi.approved.txt +409 -0
  671. package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/Baselines/compact.sw.approved.txt +2544 -0
  672. package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/Baselines/compact.sw.multi.approved.txt +2533 -0
  673. package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/Baselines/console.std.approved.txt +1538 -0
  674. package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/Baselines/console.sw.approved.txt +18236 -0
  675. package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/Baselines/console.sw.multi.approved.txt +18225 -0
  676. package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/Baselines/console.swa4.approved.txt +956 -0
  677. package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/Baselines/default.sw.multi.approved.txt +11 -0
  678. package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/Baselines/junit.sw.approved.txt +2052 -0
  679. package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/Baselines/junit.sw.multi.approved.txt +2051 -0
  680. package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/Baselines/sonarqube.sw.approved.txt +2071 -0
  681. package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/Baselines/sonarqube.sw.multi.approved.txt +2070 -0
  682. package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/Baselines/tap.sw.approved.txt +4481 -0
  683. package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/Baselines/tap.sw.multi.approved.txt +4470 -0
  684. package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/Baselines/teamcity.sw.approved.txt +998 -0
  685. package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/Baselines/teamcity.sw.multi.approved.txt +997 -0
  686. package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/Baselines/xml.sw.approved.txt +21208 -0
  687. package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/Baselines/xml.sw.multi.approved.txt +21207 -0
  688. package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/IntrospectiveTests/Algorithms.tests.cpp +94 -0
  689. package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/IntrospectiveTests/Clara.tests.cpp +73 -0
  690. package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/IntrospectiveTests/CmdLine.tests.cpp +467 -0
  691. package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/IntrospectiveTests/CmdLineHelpers.tests.cpp +111 -0
  692. package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/IntrospectiveTests/ColourImpl.tests.cpp +64 -0
  693. package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/IntrospectiveTests/Details.tests.cpp +131 -0
  694. package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/IntrospectiveTests/FloatingPoint.tests.cpp +74 -0
  695. package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/IntrospectiveTests/GeneratorsImpl.tests.cpp +546 -0
  696. package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/IntrospectiveTests/InternalBenchmark.tests.cpp +447 -0
  697. package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/IntrospectiveTests/Parse.tests.cpp +38 -0
  698. package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/IntrospectiveTests/PartTracker.tests.cpp +254 -0
  699. package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/IntrospectiveTests/RandomNumberGeneration.tests.cpp +62 -0
  700. package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/IntrospectiveTests/Reporters.tests.cpp +328 -0
  701. package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/IntrospectiveTests/Sharding.tests.cpp +45 -0
  702. package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/IntrospectiveTests/Stream.tests.cpp +32 -0
  703. package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/IntrospectiveTests/String.tests.cpp +212 -0
  704. package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/IntrospectiveTests/StringManip.tests.cpp +83 -0
  705. package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/IntrospectiveTests/Tag.tests.cpp +104 -0
  706. package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/IntrospectiveTests/TestCaseInfoHasher.tests.cpp +72 -0
  707. package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/IntrospectiveTests/TestSpec.tests.cpp +365 -0
  708. package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/IntrospectiveTests/TestSpecParser.tests.cpp +55 -0
  709. package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/IntrospectiveTests/TextFlow.tests.cpp +200 -0
  710. package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/IntrospectiveTests/ToString.tests.cpp +97 -0
  711. package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/IntrospectiveTests/Traits.tests.cpp +45 -0
  712. package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/IntrospectiveTests/UniquePtr.tests.cpp +141 -0
  713. package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/IntrospectiveTests/Xml.tests.cpp +183 -0
  714. package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/TestRegistrations.cpp +181 -0
  715. package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/TimingTests/Sleep.tests.cpp +24 -0
  716. package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/UsageTests/Approx.tests.cpp +218 -0
  717. package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/UsageTests/BDD.tests.cpp +106 -0
  718. package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/UsageTests/Benchmark.tests.cpp +173 -0
  719. package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/UsageTests/Class.tests.cpp +133 -0
  720. package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/UsageTests/Compilation.tests.cpp +355 -0
  721. package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/UsageTests/Condition.tests.cpp +334 -0
  722. package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/UsageTests/Decomposition.tests.cpp +41 -0
  723. package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/UsageTests/EnumToString.tests.cpp +108 -0
  724. package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/UsageTests/Exception.tests.cpp +204 -0
  725. package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/UsageTests/Generators.tests.cpp +313 -0
  726. package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/UsageTests/Matchers.tests.cpp +1144 -0
  727. package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/UsageTests/MatchersRanges.tests.cpp +917 -0
  728. package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/UsageTests/Message.tests.cpp +287 -0
  729. package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/UsageTests/Misc.tests.cpp +553 -0
  730. package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/UsageTests/Skip.tests.cpp +73 -0
  731. package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/UsageTests/ToStringByte.tests.cpp +23 -0
  732. package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/UsageTests/ToStringChrono.tests.cpp +51 -0
  733. package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/UsageTests/ToStringGeneral.tests.cpp +211 -0
  734. package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/UsageTests/ToStringOptional.tests.cpp +31 -0
  735. package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/UsageTests/ToStringPair.tests.cpp +38 -0
  736. package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/UsageTests/ToStringTuple.tests.cpp +54 -0
  737. package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/UsageTests/ToStringVariant.tests.cpp +99 -0
  738. package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/UsageTests/ToStringVector.tests.cpp +94 -0
  739. package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/UsageTests/ToStringWhich.tests.cpp +186 -0
  740. package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/UsageTests/Tricky.tests.cpp +380 -0
  741. package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/UsageTests/VariadicMacros.tests.cpp +29 -0
  742. package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/helpers/parse_test_spec.cpp +22 -0
  743. package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/helpers/parse_test_spec.hpp +20 -0
  744. package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/helpers/range_test_helpers.hpp +210 -0
  745. package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/helpers/type_with_lit_0_comparisons.hpp +44 -0
  746. package/deps/couchbase-cxx-client/third_party/catch2/tests/TestScripts/ConfigureTestsCommon.py +75 -0
  747. package/deps/couchbase-cxx-client/third_party/catch2/tests/TestScripts/testBazelReporter.py +104 -0
  748. package/deps/couchbase-cxx-client/third_party/catch2/tests/TestScripts/testBazelSharding.py +75 -0
  749. package/deps/couchbase-cxx-client/third_party/catch2/tests/TestScripts/testConfigureDefaultReporter.py +41 -0
  750. package/deps/couchbase-cxx-client/third_party/catch2/tests/TestScripts/testConfigureDisable.py +48 -0
  751. package/deps/couchbase-cxx-client/third_party/catch2/tests/TestScripts/testConfigureDisableStringification.py +44 -0
  752. package/deps/couchbase-cxx-client/third_party/catch2/tests/TestScripts/testConfigureExperimentalRedirect.py +49 -0
  753. package/deps/couchbase-cxx-client/third_party/catch2/tests/TestScripts/testPartialTestCaseEvent.py +79 -0
  754. package/deps/couchbase-cxx-client/third_party/catch2/tests/TestScripts/testRandomOrder.py +77 -0
  755. package/deps/couchbase-cxx-client/third_party/catch2/tests/TestScripts/testSharding.py +165 -0
  756. package/deps/couchbase-cxx-client/third_party/catch2/tests/meson.build +76 -0
  757. package/deps/couchbase-cxx-client/third_party/catch2/tools/misc/appveyorBuildConfigurationScript.bat +21 -0
  758. package/deps/couchbase-cxx-client/third_party/catch2/tools/misc/appveyorMergeCoverageScript.py +9 -0
  759. package/deps/couchbase-cxx-client/third_party/catch2/tools/misc/appveyorTestRunScript.bat +17 -0
  760. package/deps/couchbase-cxx-client/third_party/catch2/tools/misc/coverage-helper.cpp +142 -0
  761. package/deps/couchbase-cxx-client/third_party/catch2/tools/misc/installOpenCppCoverage.ps1 +19 -0
  762. package/deps/couchbase-cxx-client/third_party/catch2/tools/scripts/approvalTests.py +243 -0
  763. package/deps/couchbase-cxx-client/third_party/catch2/tools/scripts/approve.py +31 -0
  764. package/deps/couchbase-cxx-client/third_party/catch2/tools/scripts/buildAndTest.cmd +17 -0
  765. package/deps/couchbase-cxx-client/third_party/catch2/tools/scripts/buildAndTest.sh +19 -0
  766. package/deps/couchbase-cxx-client/third_party/catch2/tools/scripts/checkConvenienceHeaders.py +151 -0
  767. package/deps/couchbase-cxx-client/third_party/catch2/tools/scripts/checkDuplicateFilenames.py +14 -0
  768. package/deps/couchbase-cxx-client/third_party/catch2/tools/scripts/checkLicense.py +45 -0
  769. package/deps/couchbase-cxx-client/third_party/catch2/tools/scripts/developBuild.py +9 -0
  770. package/deps/couchbase-cxx-client/third_party/catch2/tools/scripts/extractFeaturesFromReleaseNotes.py +92 -0
  771. package/deps/couchbase-cxx-client/third_party/catch2/tools/scripts/fixWhitespace.py +51 -0
  772. package/deps/couchbase-cxx-client/third_party/catch2/tools/scripts/generateAmalgamatedFiles.py +129 -0
  773. package/deps/couchbase-cxx-client/third_party/catch2/tools/scripts/majorRelease.py +9 -0
  774. package/deps/couchbase-cxx-client/third_party/catch2/tools/scripts/minorRelease.py +9 -0
  775. package/deps/couchbase-cxx-client/third_party/catch2/tools/scripts/patchRelease.py +9 -0
  776. package/deps/couchbase-cxx-client/third_party/catch2/tools/scripts/releaseCommon.py +143 -0
  777. package/deps/couchbase-cxx-client/third_party/catch2/tools/scripts/scriptCommon.py +4 -0
  778. package/deps/couchbase-cxx-client/third_party/catch2/tools/scripts/updateDocumentSnippets.py +23 -0
  779. package/deps/couchbase-cxx-client/third_party/catch2/tools/scripts/updateDocumentToC.py +447 -0
  780. package/deps/couchbase-cxx-client/third_party/docopt/.travis.yml +103 -0
  781. package/deps/couchbase-cxx-client/third_party/docopt/CMakeLists.txt +129 -0
  782. package/deps/couchbase-cxx-client/third_party/docopt/LICENSE-Boost-1.0 +23 -0
  783. package/deps/couchbase-cxx-client/third_party/docopt/LICENSE-MIT +23 -0
  784. package/deps/couchbase-cxx-client/third_party/docopt/README.rst +479 -0
  785. package/deps/couchbase-cxx-client/third_party/docopt/docopt-config.cmake +1 -0
  786. package/deps/couchbase-cxx-client/third_party/docopt/docopt.cpp +687 -0
  787. package/deps/couchbase-cxx-client/third_party/docopt/docopt.h +98 -0
  788. package/deps/couchbase-cxx-client/third_party/docopt/docopt.pc.in +9 -0
  789. package/deps/couchbase-cxx-client/third_party/docopt/docopt_private.h +676 -0
  790. package/deps/couchbase-cxx-client/third_party/docopt/docopt_util.h +122 -0
  791. package/deps/couchbase-cxx-client/third_party/docopt/docopt_value.h +341 -0
  792. package/deps/couchbase-cxx-client/third_party/docopt/examples/naval_fate.cpp +36 -0
  793. package/deps/couchbase-cxx-client/third_party/docopt/main.cpp +16 -0
  794. package/deps/couchbase-cxx-client/third_party/docopt/run_testcase.cpp +40 -0
  795. package/deps/couchbase-cxx-client/third_party/docopt/run_tests.py +72 -0
  796. package/deps/couchbase-cxx-client/third_party/docopt/testcases.docopt +957 -0
  797. package/deps/couchbase-cxx-client/third_party/snappy/.github/workflows/build.yml +135 -0
  798. package/deps/couchbase-cxx-client/third_party/snappy/.gitmodules +6 -0
  799. package/deps/couchbase-cxx-client/third_party/snappy/CMakeLists.txt +150 -27
  800. package/deps/couchbase-cxx-client/third_party/snappy/CONTRIBUTING.md +9 -4
  801. package/deps/couchbase-cxx-client/third_party/snappy/NEWS +12 -0
  802. package/deps/couchbase-cxx-client/third_party/snappy/README.md +52 -35
  803. package/deps/couchbase-cxx-client/third_party/snappy/cmake/config.h.in +28 -24
  804. package/deps/couchbase-cxx-client/third_party/snappy/snappy-internal.h +189 -25
  805. package/deps/couchbase-cxx-client/third_party/snappy/snappy-sinksource.cc +26 -9
  806. package/deps/couchbase-cxx-client/third_party/snappy/snappy-sinksource.h +11 -11
  807. package/deps/couchbase-cxx-client/third_party/snappy/snappy-stubs-internal.cc +1 -1
  808. package/deps/couchbase-cxx-client/third_party/snappy/snappy-stubs-internal.h +227 -308
  809. package/deps/couchbase-cxx-client/third_party/snappy/snappy-stubs-public.h.in +0 -11
  810. package/deps/couchbase-cxx-client/third_party/snappy/snappy-test.cc +88 -198
  811. package/deps/couchbase-cxx-client/third_party/snappy/snappy-test.h +102 -285
  812. package/deps/couchbase-cxx-client/third_party/snappy/snappy.cc +1176 -410
  813. package/deps/couchbase-cxx-client/third_party/snappy/snappy.h +19 -4
  814. package/deps/couchbase-cxx-client/third_party/snappy/snappy_benchmark.cc +378 -0
  815. package/deps/couchbase-cxx-client/third_party/snappy/snappy_compress_fuzzer.cc +3 -2
  816. package/deps/couchbase-cxx-client/third_party/snappy/snappy_test_data.cc +57 -0
  817. package/deps/couchbase-cxx-client/third_party/snappy/snappy_test_data.h +68 -0
  818. package/deps/couchbase-cxx-client/third_party/snappy/snappy_test_tool.cc +471 -0
  819. package/deps/couchbase-cxx-client/third_party/snappy/snappy_uncompress_fuzzer.cc +3 -2
  820. package/deps/couchbase-cxx-client/third_party/snappy/snappy_unittest.cc +170 -666
  821. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/.github/ISSUE_TEMPLATE/bug_report.md +32 -0
  822. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/.github/ISSUE_TEMPLATE/feature_request.md +20 -0
  823. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/.github/workflows/build-and-test.yml +38 -0
  824. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/.github/workflows/pylint.yml +26 -0
  825. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/.github/workflows/test_bindings.yml +24 -0
  826. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/.travis-libcxx-setup.sh +28 -0
  827. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/.travis.yml +231 -0
  828. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/.ycm_extra_conf.py +115 -0
  829. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/AUTHORS +58 -0
  830. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/BUILD.bazel +44 -0
  831. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/CMakeLists.txt +287 -0
  832. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/CONTRIBUTING.md +58 -0
  833. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/CONTRIBUTORS +83 -0
  834. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/LICENSE +202 -0
  835. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/README.md +1323 -0
  836. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/WORKSPACE +51 -0
  837. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/_config.yml +1 -0
  838. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/appveyor.yml +50 -0
  839. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/bindings/python/BUILD +3 -0
  840. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/bindings/python/build_defs.bzl +25 -0
  841. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/bindings/python/google_benchmark/BUILD +38 -0
  842. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/bindings/python/google_benchmark/__init__.py +156 -0
  843. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/bindings/python/google_benchmark/benchmark.cc +180 -0
  844. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/bindings/python/google_benchmark/example.py +136 -0
  845. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/bindings/python/pybind11.BUILD +20 -0
  846. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/bindings/python/python_headers.BUILD +6 -0
  847. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/bindings/python/requirements.txt +2 -0
  848. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/cmake/AddCXXCompilerFlag.cmake +74 -0
  849. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/cmake/CXXFeatureCheck.cmake +69 -0
  850. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/cmake/Config.cmake.in +1 -0
  851. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/cmake/GetGitVersion.cmake +54 -0
  852. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/cmake/GoogleTest.cmake +41 -0
  853. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/cmake/GoogleTest.cmake.in +58 -0
  854. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/cmake/benchmark.pc.in +12 -0
  855. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/cmake/gnu_posix_regex.cpp +12 -0
  856. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/cmake/llvm-toolchain.cmake +8 -0
  857. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/cmake/posix_regex.cpp +14 -0
  858. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/cmake/split_list.cmake +3 -0
  859. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/cmake/std_regex.cpp +10 -0
  860. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/cmake/steady_clock.cpp +7 -0
  861. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/cmake/thread_safety_attributes.cpp +4 -0
  862. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/conan/CMakeLists.txt +7 -0
  863. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/conan/test_package/CMakeLists.txt +10 -0
  864. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/conan/test_package/conanfile.py +19 -0
  865. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/conan/test_package/test_package.cpp +18 -0
  866. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/conanfile.py +79 -0
  867. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/dependencies.md +18 -0
  868. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/docs/AssemblyTests.md +147 -0
  869. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/docs/_config.yml +1 -0
  870. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/docs/releasing.md +16 -0
  871. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/docs/tools.md +203 -0
  872. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/include/benchmark/benchmark.h +1604 -0
  873. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/requirements.txt +2 -0
  874. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/setup.py +140 -0
  875. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/src/CMakeLists.txt +114 -0
  876. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/src/arraysize.h +33 -0
  877. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/src/benchmark.cc +499 -0
  878. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/src/benchmark_api_internal.cc +15 -0
  879. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/src/benchmark_api_internal.h +53 -0
  880. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/src/benchmark_main.cc +17 -0
  881. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/src/benchmark_name.cc +58 -0
  882. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/src/benchmark_register.cc +515 -0
  883. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/src/benchmark_register.h +108 -0
  884. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/src/benchmark_runner.cc +362 -0
  885. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/src/benchmark_runner.h +51 -0
  886. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/src/check.h +82 -0
  887. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/src/colorprint.cc +188 -0
  888. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/src/colorprint.h +33 -0
  889. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/src/commandlineflags.cc +228 -0
  890. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/src/commandlineflags.h +103 -0
  891. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/src/complexity.cc +238 -0
  892. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/src/complexity.h +55 -0
  893. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/src/console_reporter.cc +177 -0
  894. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/src/counter.cc +80 -0
  895. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/src/counter.h +32 -0
  896. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/src/csv_reporter.cc +154 -0
  897. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/src/cycleclock.h +211 -0
  898. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/src/internal_macros.h +102 -0
  899. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/src/json_reporter.cc +255 -0
  900. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/src/log.h +74 -0
  901. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/src/mutex.h +155 -0
  902. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/src/re.h +158 -0
  903. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/src/reporter.cc +105 -0
  904. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/src/sleep.cc +67 -0
  905. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/src/sleep.h +15 -0
  906. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/src/statistics.cc +193 -0
  907. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/src/statistics.h +37 -0
  908. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/src/string_util.cc +255 -0
  909. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/src/string_util.h +59 -0
  910. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/src/sysinfo.cc +716 -0
  911. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/src/thread_manager.h +64 -0
  912. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/src/thread_timer.h +86 -0
  913. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/src/timers.cc +245 -0
  914. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/src/timers.h +48 -0
  915. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/test/AssemblyTests.cmake +46 -0
  916. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/test/BUILD +73 -0
  917. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/test/CMakeLists.txt +263 -0
  918. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/test/args_product_test.cc +77 -0
  919. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/test/basic_test.cc +136 -0
  920. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/test/benchmark_gtest.cc +134 -0
  921. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/test/benchmark_name_gtest.cc +74 -0
  922. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/test/benchmark_test.cc +245 -0
  923. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/test/clobber_memory_assembly_test.cc +64 -0
  924. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/test/commandlineflags_gtest.cc +201 -0
  925. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/test/complexity_test.cc +213 -0
  926. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/test/cxx03_test.cc +63 -0
  927. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/test/diagnostics_test.cc +80 -0
  928. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/test/display_aggregates_only_test.cc +43 -0
  929. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/test/donotoptimize_assembly_test.cc +163 -0
  930. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/test/donotoptimize_test.cc +52 -0
  931. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/test/filter_test.cc +104 -0
  932. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/test/fixture_test.cc +51 -0
  933. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/test/internal_threading_test.cc +184 -0
  934. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/test/link_main_test.cc +8 -0
  935. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/test/map_test.cc +57 -0
  936. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/test/memory_manager_test.cc +44 -0
  937. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/test/multiple_ranges_test.cc +96 -0
  938. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/test/options_test.cc +75 -0
  939. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/test/output_test.h +213 -0
  940. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/test/output_test_helper.cc +515 -0
  941. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/test/register_benchmark_test.cc +184 -0
  942. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/test/report_aggregates_only_test.cc +39 -0
  943. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/test/reporter_output_test.cc +747 -0
  944. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/test/skip_with_error_test.cc +195 -0
  945. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/test/state_assembly_test.cc +68 -0
  946. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/test/statistics_gtest.cc +28 -0
  947. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/test/string_util_gtest.cc +153 -0
  948. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/test/templated_fixture_test.cc +28 -0
  949. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/test/user_counters_tabular_test.cc +285 -0
  950. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/test/user_counters_test.cc +531 -0
  951. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/test/user_counters_thousands_test.cc +173 -0
  952. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/tools/BUILD.bazel +19 -0
  953. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/tools/compare.py +429 -0
  954. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/tools/gbench/Inputs/test1_run1.json +119 -0
  955. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/tools/gbench/Inputs/test1_run2.json +119 -0
  956. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/tools/gbench/Inputs/test2_run.json +81 -0
  957. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/tools/gbench/Inputs/test3_run0.json +65 -0
  958. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/tools/gbench/Inputs/test3_run1.json +65 -0
  959. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/tools/gbench/__init__.py +8 -0
  960. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/tools/gbench/report.py +903 -0
  961. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/tools/gbench/util.py +163 -0
  962. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/tools/requirements.txt +1 -0
  963. package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/tools/strip_asm.py +151 -0
  964. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/.travis.yml +65 -0
  965. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/BUILD.bazel +182 -0
  966. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/CMakeLists.txt +32 -0
  967. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/CONTRIBUTING.md +142 -0
  968. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/LICENSE +28 -0
  969. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/README.md +135 -0
  970. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/WORKSPACE +30 -0
  971. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/appveyor.yml +156 -0
  972. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/ci/build-linux-bazel.sh +36 -0
  973. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/ci/build-platformio.sh +2 -0
  974. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/ci/env-linux.sh +41 -0
  975. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/ci/env-osx.sh +41 -0
  976. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/ci/get-nprocessors.sh +48 -0
  977. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/ci/install-linux.sh +49 -0
  978. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/ci/install-osx.sh +39 -0
  979. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/ci/install-platformio.sh +5 -0
  980. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/ci/log-config.sh +47 -0
  981. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/ci/travis.sh +29 -0
  982. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/CMakeLists.txt +219 -0
  983. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/CONTRIBUTORS +40 -0
  984. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/LICENSE +28 -0
  985. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/README.md +44 -0
  986. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/cmake/gmock.pc.in +10 -0
  987. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/cmake/gmock_main.pc.in +10 -0
  988. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/docs/cheat_sheet.md +786 -0
  989. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/docs/community_created_documentation.md +9 -0
  990. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/docs/cook_book.md +4276 -0
  991. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/docs/for_dummies.md +702 -0
  992. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/docs/gmock_faq.md +398 -0
  993. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/docs/pump_manual.md +189 -0
  994. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/include/gmock/gmock-actions.h +1688 -0
  995. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/include/gmock/gmock-cardinalities.h +157 -0
  996. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/include/gmock/gmock-function-mocker.h +479 -0
  997. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/include/gmock/gmock-generated-actions.h +577 -0
  998. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/include/gmock/gmock-generated-actions.h.pump +390 -0
  999. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/include/gmock/gmock-matchers.h +5394 -0
  1000. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/include/gmock/gmock-more-matchers.h +92 -0
  1001. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/include/gmock/gmock-nice-strict.h +230 -0
  1002. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/include/gmock/gmock-spec-builders.h +2030 -0
  1003. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/include/gmock/gmock.h +98 -0
  1004. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/include/gmock/internal/custom/README.md +16 -0
  1005. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/include/gmock/internal/custom/gmock-generated-actions.h +10 -0
  1006. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/include/gmock/internal/custom/gmock-generated-actions.h.pump +12 -0
  1007. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/include/gmock/internal/custom/gmock-matchers.h +36 -0
  1008. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/include/gmock/internal/custom/gmock-port.h +39 -0
  1009. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/include/gmock/internal/gmock-internal-utils.h +459 -0
  1010. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/include/gmock/internal/gmock-port.h +87 -0
  1011. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/include/gmock/internal/gmock-pp.h +279 -0
  1012. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/scripts/README.md +5 -0
  1013. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/scripts/fuse_gmock_files.py +257 -0
  1014. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/scripts/generator/LICENSE +203 -0
  1015. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/scripts/generator/README +34 -0
  1016. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/scripts/generator/README.cppclean +115 -0
  1017. package/deps/couchbase-cxx-client/{core/CMakeLists.txt → third_party/snappy/third_party/googletest/googlemock/scripts/generator/cpp/__init__.py} +0 -0
  1018. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/scripts/generator/cpp/ast.py +1772 -0
  1019. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/scripts/generator/cpp/gmock_class.py +245 -0
  1020. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/scripts/generator/cpp/gmock_class_test.py +552 -0
  1021. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/scripts/generator/cpp/keywords.py +56 -0
  1022. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/scripts/generator/cpp/tokenize.py +284 -0
  1023. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/scripts/generator/cpp/utils.py +37 -0
  1024. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/scripts/generator/gmock_gen.py +30 -0
  1025. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/scripts/pump.py +856 -0
  1026. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/src/gmock-all.cc +46 -0
  1027. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/src/gmock-cardinalities.cc +155 -0
  1028. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/src/gmock-internal-utils.cc +200 -0
  1029. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/src/gmock-matchers.cc +459 -0
  1030. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/src/gmock-spec-builders.cc +908 -0
  1031. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/src/gmock.cc +213 -0
  1032. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/src/gmock_main.cc +72 -0
  1033. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/test/BUILD.bazel +111 -0
  1034. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/test/gmock-actions_test.cc +1583 -0
  1035. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/test/gmock-cardinalities_test.cc +429 -0
  1036. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/test/gmock-function-mocker_nc.cc +16 -0
  1037. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/test/gmock-function-mocker_nc_test.py +43 -0
  1038. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/test/gmock-function-mocker_test.cc +974 -0
  1039. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/test/gmock-generated-actions_test.cc +1036 -0
  1040. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/test/gmock-internal-utils_test.cc +720 -0
  1041. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/test/gmock-matchers_test.cc +8562 -0
  1042. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/test/gmock-more-actions_test.cc +725 -0
  1043. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/test/gmock-nice-strict_test.cc +500 -0
  1044. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/test/gmock-port_test.cc +42 -0
  1045. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/test/gmock-pp-string_test.cc +206 -0
  1046. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/test/gmock-pp_test.cc +83 -0
  1047. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/test/gmock-spec-builders_test.cc +2775 -0
  1048. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/test/gmock_all_test.cc +47 -0
  1049. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/test/gmock_ex_test.cc +80 -0
  1050. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/test/gmock_leak_test.py +104 -0
  1051. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/test/gmock_leak_test_.cc +99 -0
  1052. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/test/gmock_link2_test.cc +39 -0
  1053. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/test/gmock_link_test.cc +39 -0
  1054. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/test/gmock_link_test.h +690 -0
  1055. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/test/gmock_output_test.py +183 -0
  1056. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/test/gmock_output_test_.cc +309 -0
  1057. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/test/gmock_output_test_golden.txt +317 -0
  1058. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/test/gmock_stress_test.cc +240 -0
  1059. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/test/gmock_test.cc +181 -0
  1060. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/test/gmock_test_utils.py +108 -0
  1061. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/test/pump_test.py +182 -0
  1062. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/CMakeLists.txt +320 -0
  1063. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/CONTRIBUTORS +38 -0
  1064. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/LICENSE +28 -0
  1065. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/README.md +262 -0
  1066. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/cmake/Config.cmake.in +9 -0
  1067. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/cmake/gtest.pc.in +9 -0
  1068. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/cmake/gtest_main.pc.in +10 -0
  1069. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/cmake/internal_utils.cmake +341 -0
  1070. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/cmake/libgtest.la.in +21 -0
  1071. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/docs/advanced.md +2640 -0
  1072. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/docs/faq.md +771 -0
  1073. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/docs/pkgconfig.md +150 -0
  1074. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/docs/primer.md +583 -0
  1075. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/docs/samples.md +22 -0
  1076. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/include/gtest/gtest-death-test.h +342 -0
  1077. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/include/gtest/gtest-matchers.h +756 -0
  1078. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/include/gtest/gtest-message.h +219 -0
  1079. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/include/gtest/gtest-param-test.h +512 -0
  1080. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/include/gtest/gtest-printers.h +903 -0
  1081. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/include/gtest/gtest-spi.h +238 -0
  1082. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/include/gtest/gtest-test-part.h +184 -0
  1083. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/include/gtest/gtest-typed-test.h +337 -0
  1084. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/include/gtest/gtest.h +2491 -0
  1085. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/include/gtest/gtest_pred_impl.h +359 -0
  1086. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/include/gtest/gtest_prod.h +61 -0
  1087. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/include/gtest/internal/custom/README.md +56 -0
  1088. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/include/gtest/internal/custom/gtest-port.h +37 -0
  1089. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/include/gtest/internal/custom/gtest-printers.h +42 -0
  1090. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/include/gtest/internal/custom/gtest.h +37 -0
  1091. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/include/gtest/internal/gtest-death-test-internal.h +304 -0
  1092. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/include/gtest/internal/gtest-filepath.h +211 -0
  1093. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/include/gtest/internal/gtest-internal.h +1564 -0
  1094. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/include/gtest/internal/gtest-param-util.h +947 -0
  1095. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/include/gtest/internal/gtest-port-arch.h +112 -0
  1096. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/include/gtest/internal/gtest-port.h +2371 -0
  1097. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/include/gtest/internal/gtest-string.h +175 -0
  1098. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/include/gtest/internal/gtest-type-util.h +187 -0
  1099. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/samples/prime_tables.h +126 -0
  1100. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/samples/sample1.cc +66 -0
  1101. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/samples/sample1.h +41 -0
  1102. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/samples/sample10_unittest.cc +139 -0
  1103. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/samples/sample1_unittest.cc +151 -0
  1104. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/samples/sample2.cc +54 -0
  1105. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/samples/sample2.h +81 -0
  1106. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/samples/sample2_unittest.cc +107 -0
  1107. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/samples/sample3-inl.h +172 -0
  1108. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/samples/sample3_unittest.cc +149 -0
  1109. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/samples/sample4.cc +54 -0
  1110. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/samples/sample4.h +53 -0
  1111. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/samples/sample4_unittest.cc +53 -0
  1112. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/samples/sample5_unittest.cc +196 -0
  1113. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/samples/sample6_unittest.cc +224 -0
  1114. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/samples/sample7_unittest.cc +117 -0
  1115. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/samples/sample8_unittest.cc +154 -0
  1116. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/samples/sample9_unittest.cc +156 -0
  1117. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/scripts/README.md +5 -0
  1118. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/scripts/common.py +83 -0
  1119. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/scripts/fuse_gtest_files.py +253 -0
  1120. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/scripts/gen_gtest_pred_impl.py +733 -0
  1121. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/scripts/gtest-config.in +274 -0
  1122. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/scripts/release_docs.py +158 -0
  1123. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/scripts/run_with_path.py +32 -0
  1124. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/scripts/upload.py +1402 -0
  1125. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/scripts/upload_gtest.py +78 -0
  1126. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/src/gtest-all.cc +48 -0
  1127. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/src/gtest-death-test.cc +1644 -0
  1128. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/src/gtest-filepath.cc +368 -0
  1129. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/src/gtest-internal-inl.h +1228 -0
  1130. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/src/gtest-matchers.cc +97 -0
  1131. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/src/gtest-port.cc +1404 -0
  1132. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/src/gtest-printers.cc +444 -0
  1133. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/src/gtest-test-part.cc +108 -0
  1134. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/src/gtest-typed-test.cc +111 -0
  1135. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/src/gtest.cc +6606 -0
  1136. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/src/gtest_main.cc +54 -0
  1137. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/BUILD.bazel +562 -0
  1138. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/googletest-break-on-failure-unittest.py +208 -0
  1139. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/googletest-break-on-failure-unittest_.cc +86 -0
  1140. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/googletest-catch-exceptions-test.py +236 -0
  1141. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/googletest-catch-exceptions-test_.cc +293 -0
  1142. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/googletest-color-test.py +127 -0
  1143. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/googletest-color-test_.cc +62 -0
  1144. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/googletest-death-test-test.cc +1542 -0
  1145. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/googletest-death-test_ex_test.cc +92 -0
  1146. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/googletest-env-var-test.py +120 -0
  1147. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/googletest-env-var-test_.cc +132 -0
  1148. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/googletest-failfast-unittest.py +410 -0
  1149. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/googletest-failfast-unittest_.cc +167 -0
  1150. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/googletest-filepath-test.cc +649 -0
  1151. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/googletest-filter-unittest.py +639 -0
  1152. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/googletest-filter-unittest_.cc +137 -0
  1153. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/googletest-json-outfiles-test.py +191 -0
  1154. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/googletest-json-output-unittest.py +804 -0
  1155. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/googletest-list-tests-unittest.py +205 -0
  1156. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/googletest-list-tests-unittest_.cc +156 -0
  1157. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/googletest-listener-test.cc +518 -0
  1158. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/googletest-message-test.cc +158 -0
  1159. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/googletest-options-test.cc +216 -0
  1160. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/googletest-output-test-golden-lin.txt +1180 -0
  1161. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/googletest-output-test.py +346 -0
  1162. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/googletest-output-test_.cc +1126 -0
  1163. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/googletest-param-test-invalid-name1-test.py +63 -0
  1164. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/googletest-param-test-invalid-name1-test_.cc +50 -0
  1165. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/googletest-param-test-invalid-name2-test.py +62 -0
  1166. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/googletest-param-test-invalid-name2-test_.cc +55 -0
  1167. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/googletest-param-test-test.cc +1119 -0
  1168. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/googletest-param-test-test.h +51 -0
  1169. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/googletest-param-test2-test.cc +61 -0
  1170. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/googletest-port-test.cc +1280 -0
  1171. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/googletest-printers-test.cc +1847 -0
  1172. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/googletest-setuptestsuite-test.py +54 -0
  1173. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/googletest-setuptestsuite-test_.cc +49 -0
  1174. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/googletest-shuffle-test.py +323 -0
  1175. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/googletest-shuffle-test_.cc +101 -0
  1176. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/googletest-test-part-test.cc +230 -0
  1177. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/googletest-throw-on-failure-test.py +168 -0
  1178. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/googletest-throw-on-failure-test_.cc +71 -0
  1179. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/googletest-uninitialized-test.py +67 -0
  1180. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/googletest-uninitialized-test_.cc +42 -0
  1181. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/gtest-typed-test2_test.cc +44 -0
  1182. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/gtest-typed-test_test.cc +462 -0
  1183. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/gtest-typed-test_test.h +65 -0
  1184. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/gtest-unittest-api_test.cc +341 -0
  1185. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/gtest_all_test.cc +46 -0
  1186. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/gtest_assert_by_exception_test.cc +116 -0
  1187. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/gtest_environment_test.cc +188 -0
  1188. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/gtest_help_test.py +171 -0
  1189. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/gtest_help_test_.cc +45 -0
  1190. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/gtest_json_test_utils.py +60 -0
  1191. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/gtest_list_output_unittest.py +286 -0
  1192. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/gtest_list_output_unittest_.cc +81 -0
  1193. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/gtest_main_unittest.cc +44 -0
  1194. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/gtest_no_test_unittest.cc +54 -0
  1195. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/gtest_pred_impl_unittest.cc +2422 -0
  1196. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/gtest_premature_exit_test.cc +126 -0
  1197. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/gtest_prod_test.cc +56 -0
  1198. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/gtest_repeat_test.cc +233 -0
  1199. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/gtest_skip_check_output_test.py +59 -0
  1200. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/gtest_skip_environment_check_output_test.py +54 -0
  1201. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/gtest_skip_in_environment_setup_test.cc +49 -0
  1202. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/gtest_skip_test.cc +55 -0
  1203. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/gtest_sole_header_test.cc +56 -0
  1204. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/gtest_stress_test.cc +248 -0
  1205. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/gtest_test_macro_stack_footprint_test.cc +89 -0
  1206. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/gtest_test_utils.py +312 -0
  1207. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/gtest_testbridge_test.py +63 -0
  1208. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/gtest_testbridge_test_.cc +43 -0
  1209. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/gtest_throw_on_failure_ex_test.cc +90 -0
  1210. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/gtest_unittest.cc +7792 -0
  1211. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/gtest_xml_outfile1_test_.cc +43 -0
  1212. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/gtest_xml_outfile2_test_.cc +43 -0
  1213. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/gtest_xml_outfiles_test.py +135 -0
  1214. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/gtest_xml_output_unittest.py +405 -0
  1215. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/gtest_xml_output_unittest_.cc +197 -0
  1216. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/gtest_xml_test_utils.py +197 -0
  1217. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/production.cc +35 -0
  1218. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/production.h +54 -0
  1219. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/library.json +62 -0
  1220. package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/platformio.ini +47 -0
  1221. package/deps/couchbase-cxx-client/tools/CMakeLists.txt +16 -0
  1222. package/deps/couchbase-cxx-client/tools/analytics.cxx +375 -0
  1223. package/deps/couchbase-cxx-client/tools/analytics.hxx +26 -0
  1224. package/deps/couchbase-cxx-client/tools/cbc.cxx +72 -0
  1225. package/deps/couchbase-cxx-client/tools/command.hxx +31 -0
  1226. package/deps/couchbase-cxx-client/tools/command_registry.cxx +47 -0
  1227. package/deps/couchbase-cxx-client/tools/command_registry.hxx +39 -0
  1228. package/deps/couchbase-cxx-client/tools/get.cxx +263 -0
  1229. package/deps/couchbase-cxx-client/tools/get.hxx +26 -0
  1230. package/deps/couchbase-cxx-client/tools/pillowfight.cxx +396 -0
  1231. package/deps/couchbase-cxx-client/tools/pillowfight.hxx +26 -0
  1232. package/deps/couchbase-cxx-client/tools/query.cxx +437 -0
  1233. package/deps/couchbase-cxx-client/tools/query.hxx +26 -0
  1234. package/deps/couchbase-cxx-client/tools/utils.cxx +432 -0
  1235. package/deps/couchbase-cxx-client/tools/utils.hxx +153 -0
  1236. package/deps/couchbase-cxx-client/tools/version.cxx +82 -0
  1237. package/deps/couchbase-cxx-client/tools/version.hxx +26 -0
  1238. package/dist/authenticators.d.ts +3 -3
  1239. package/dist/authenticators.js +1 -2
  1240. package/dist/binding.d.ts +56 -25
  1241. package/dist/bindingutilities.d.ts +6 -2
  1242. package/dist/bindingutilities.js +39 -7
  1243. package/dist/cluster.d.ts +27 -0
  1244. package/dist/cluster.js +102 -63
  1245. package/dist/collection.d.ts +6 -0
  1246. package/dist/collection.js +14 -6
  1247. package/dist/configProfile.js +16 -10
  1248. package/dist/couchbase.d.ts +1 -0
  1249. package/dist/couchbase.js +2 -1
  1250. package/dist/errors.d.ts +2 -2
  1251. package/dist/errors.js +4 -4
  1252. package/dist/queryexecutor.js +1 -1
  1253. package/dist/queryindexmanager.d.ts +100 -4
  1254. package/dist/queryindexmanager.js +344 -118
  1255. package/dist/scope.js +6 -6
  1256. package/dist/sdspecs.js +11 -11
  1257. package/dist/searchquery.d.ts +1 -1
  1258. package/dist/streamablepromises.d.ts +1 -1
  1259. package/dist/transactions.js +5 -3
  1260. package/dist/usermanager.js +9 -9
  1261. package/dist/viewindexmanager.js +8 -8
  1262. package/package.json +1 -1
  1263. package/src/binding.cpp +2 -0
  1264. package/src/connection.cpp +2 -0
  1265. package/src/connection.hpp +1 -0
  1266. package/src/connection_autogen.cpp +16 -0
  1267. package/src/jstocbpp_autogen.hpp +93 -27
  1268. package/src/jstocbpp_basic.hpp +32 -2
  1269. package/src/jstocbpp_errors.hpp +35 -0
  1270. package/src/jstocbpp_transactions.hpp +61 -17
  1271. package/src/transaction.cpp +1 -1
  1272. package/tools/gen-bindings-js.js +1 -0
  1273. package/tools/gen-bindings-json.py +4 -2
  1274. package/deps/couchbase-cxx-client/core/config_profile.cxx +0 -25
  1275. package/deps/couchbase-cxx-client/core/management/query_index.hxx +0 -39
  1276. package/deps/couchbase-cxx-client/core/transactions/logging.cxx +0 -107
  1277. package/deps/couchbase-cxx-client/test/test_transaction_transaction_context.cxx +0 -550
  1278. package/deps/couchbase-cxx-client/test/test_transaction_transaction_public_async_api.cxx +0 -392
  1279. package/deps/couchbase-cxx-client/test/test_transaction_transaction_public_blocking_api.cxx +0 -628
  1280. package/deps/couchbase-cxx-client/test/test_transaction_transaction_simple.cxx +0 -899
  1281. package/deps/couchbase-cxx-client/test/test_transaction_transaction_simple_async.cxx +0 -972
  1282. package/deps/couchbase-cxx-client/test/tools/CMakeLists.txt +0 -10
  1283. package/deps/couchbase-cxx-client/test/tools/tool_kv_loader.cxx +0 -349
  1284. package/deps/couchbase-cxx-client/test/utils/uniq_id.cxx +0 -29
  1285. package/deps/couchbase-cxx-client/test/utils/uniq_id.hxx +0 -26
  1286. package/deps/couchbase-cxx-client/third_party/catch2/.travis.yml +0 -335
  1287. package/deps/couchbase-cxx-client/third_party/catch2/CMake/MiscFunctions.cmake +0 -26
  1288. package/deps/couchbase-cxx-client/third_party/catch2/WORKSPACE +0 -0
  1289. package/deps/couchbase-cxx-client/third_party/catch2/contrib/Catch.cmake +0 -206
  1290. package/deps/couchbase-cxx-client/third_party/catch2/contrib/CatchAddTests.cmake +0 -135
  1291. package/deps/couchbase-cxx-client/third_party/catch2/docs/slow-compiles.md +0 -106
  1292. package/deps/couchbase-cxx-client/third_party/catch2/examples/000-CatchMain.cpp +0 -15
  1293. package/deps/couchbase-cxx-client/third_party/catch2/examples/200-Rpt-CatchMain.cpp +0 -27
  1294. package/deps/couchbase-cxx-client/third_party/catch2/examples/207-Rpt-TeamCityReporter.cpp +0 -171
  1295. package/deps/couchbase-cxx-client/third_party/catch2/include/catch.hpp +0 -496
  1296. package/deps/couchbase-cxx-client/third_party/catch2/include/catch_with_main.hpp +0 -14
  1297. package/deps/couchbase-cxx-client/third_party/catch2/include/external/clara.hpp +0 -1268
  1298. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/benchmark/catch_benchmark.hpp +0 -122
  1299. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/benchmark/catch_benchmarking_all.hpp +0 -29
  1300. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/benchmark/catch_chronometer.hpp +0 -71
  1301. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/benchmark/catch_clock.hpp +0 -40
  1302. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/benchmark/catch_constructor.hpp +0 -79
  1303. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/benchmark/catch_environment.hpp +0 -38
  1304. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/benchmark/catch_estimate.hpp +0 -31
  1305. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/benchmark/catch_execution_plan.hpp +0 -59
  1306. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/benchmark/catch_optimizer.hpp +0 -68
  1307. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/benchmark/catch_outlier_classification.hpp +0 -29
  1308. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/benchmark/catch_sample_analysis.hpp +0 -50
  1309. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/benchmark/detail/catch_analyse.hpp +0 -78
  1310. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/benchmark/detail/catch_benchmark_function.hpp +0 -105
  1311. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/benchmark/detail/catch_complete_invoke.hpp +0 -68
  1312. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/benchmark/detail/catch_estimate_clock.hpp +0 -115
  1313. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/benchmark/detail/catch_measure.hpp +0 -35
  1314. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/benchmark/detail/catch_repeat.hpp +0 -37
  1315. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/benchmark/detail/catch_run_for_at_least.hpp +0 -65
  1316. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/benchmark/detail/catch_stats.cpp +0 -224
  1317. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/benchmark/detail/catch_stats.hpp +0 -160
  1318. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/benchmark/detail/catch_timing.hpp +0 -33
  1319. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_approx.cpp +0 -88
  1320. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_approx.h +0 -132
  1321. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_assertionhandler.cpp +0 -122
  1322. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_assertionhandler.h +0 -88
  1323. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_assertioninfo.h +0 -31
  1324. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_assertionresult.cpp +0 -104
  1325. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_assertionresult.h +0 -59
  1326. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_capture.hpp +0 -159
  1327. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_capture_matchers.cpp +0 -24
  1328. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_capture_matchers.h +0 -88
  1329. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_clara.h +0 -38
  1330. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_commandline.cpp +0 -230
  1331. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_commandline.h +0 -20
  1332. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_common.cpp +0 -43
  1333. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_common.h +0 -92
  1334. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_compiler_capabilities.h +0 -377
  1335. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_config.cpp +0 -86
  1336. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_config.hpp +0 -133
  1337. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_config_uncaught_exceptions.hpp +0 -44
  1338. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_console_colour.cpp +0 -243
  1339. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_console_colour.h +0 -69
  1340. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_context.cpp +0 -70
  1341. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_context.h +0 -64
  1342. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_debug_console.cpp +0 -41
  1343. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_debug_console.h +0 -17
  1344. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_debugger.cpp +0 -122
  1345. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_debugger.h +0 -65
  1346. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_decomposer.cpp +0 -24
  1347. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_decomposer.h +0 -259
  1348. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_default_main.hpp +0 -47
  1349. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_enforce.cpp +0 -40
  1350. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_enforce.h +0 -53
  1351. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_enum_values_registry.cpp +0 -75
  1352. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_enum_values_registry.h +0 -35
  1353. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_errno_guard.cpp +0 -15
  1354. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_errno_guard.h +0 -22
  1355. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_exception_translator_registry.cpp +0 -89
  1356. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_exception_translator_registry.h +0 -30
  1357. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_external_interfaces.h +0 -20
  1358. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_fatal_condition.cpp +0 -244
  1359. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_fatal_condition.h +0 -68
  1360. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_generators.cpp +0 -32
  1361. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_generators.hpp +0 -219
  1362. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_generators_generic.hpp +0 -237
  1363. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_generators_specific.hpp +0 -175
  1364. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_impl.hpp +0 -33
  1365. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_interfaces_capture.cpp +0 -5
  1366. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_interfaces_capture.h +0 -100
  1367. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_interfaces_config.cpp +0 -5
  1368. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_interfaces_config.h +0 -92
  1369. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_interfaces_enum_values_registry.h +0 -46
  1370. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_interfaces_exception.cpp +0 -6
  1371. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_interfaces_exception.h +0 -88
  1372. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_interfaces_generatortracker.h +0 -39
  1373. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_interfaces_registry_hub.cpp +0 -6
  1374. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_interfaces_registry_hub.h +0 -61
  1375. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_interfaces_reporter.cpp +0 -114
  1376. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_interfaces_reporter.h +0 -272
  1377. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_interfaces_runner.cpp +0 -5
  1378. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_interfaces_runner.h +0 -19
  1379. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_interfaces_tag_alias_registry.h +0 -28
  1380. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_interfaces_testcase.cpp +0 -6
  1381. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_interfaces_testcase.h +0 -38
  1382. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_leak_detector.cpp +0 -37
  1383. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_leak_detector.h +0 -18
  1384. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_list.cpp +0 -173
  1385. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_list.h +0 -38
  1386. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_matchers.cpp +0 -28
  1387. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_matchers.h +0 -174
  1388. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_matchers_exception.cpp +0 -30
  1389. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_matchers_exception.hpp +0 -36
  1390. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_matchers_floating.cpp +0 -237
  1391. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_matchers_floating.h +0 -70
  1392. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_matchers_generic.cpp +0 -9
  1393. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_matchers_generic.hpp +0 -58
  1394. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_matchers_string.cpp +0 -118
  1395. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_matchers_string.h +0 -80
  1396. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_matchers_vector.h +0 -180
  1397. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_message.cpp +0 -142
  1398. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_message.h +0 -99
  1399. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_meta.hpp +0 -50
  1400. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_objc.hpp +0 -215
  1401. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_objc_arc.hpp +0 -51
  1402. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_option.hpp +0 -73
  1403. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_output_redirect.cpp +0 -147
  1404. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_output_redirect.h +0 -116
  1405. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_platform.h +0 -30
  1406. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_polyfills.cpp +0 -31
  1407. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_polyfills.hpp +0 -15
  1408. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_preprocessor.hpp +0 -237
  1409. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_random_number_generator.cpp +0 -73
  1410. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_random_number_generator.h +0 -58
  1411. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_reenable_warnings.h +0 -21
  1412. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_registry_hub.cpp +0 -99
  1413. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_reporter_registrars.hpp +0 -78
  1414. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_reporter_registry.cpp +0 -34
  1415. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_reporter_registry.h +0 -37
  1416. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_result_type.cpp +0 -27
  1417. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_result_type.h +0 -55
  1418. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_run_context.cpp +0 -595
  1419. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_run_context.h +0 -159
  1420. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_section.cpp +0 -38
  1421. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_section.h +0 -51
  1422. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_section_info.cpp +0 -19
  1423. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_section_info.h +0 -42
  1424. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_session.cpp +0 -313
  1425. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_session.h +0 -62
  1426. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_singletons.cpp +0 -36
  1427. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_singletons.hpp +0 -44
  1428. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_startup_exception_registry.cpp +0 -28
  1429. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_startup_exception_registry.h +0 -29
  1430. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_stream.cpp +0 -187
  1431. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_stream.h +0 -51
  1432. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_string_manip.cpp +0 -109
  1433. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_string_manip.h +0 -45
  1434. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_stringref.cpp +0 -50
  1435. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_stringref.h +0 -104
  1436. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_suppress_warnings.h +0 -27
  1437. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_tag_alias.cpp +0 -5
  1438. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_tag_alias.h +0 -26
  1439. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_tag_alias_autoregistrar.cpp +0 -16
  1440. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_tag_alias_autoregistrar.h +0 -26
  1441. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_tag_alias_registry.cpp +0 -58
  1442. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_tag_alias_registry.h +0 -31
  1443. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_test_case_info.cpp +0 -186
  1444. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_test_case_info.h +0 -90
  1445. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_test_case_registry_impl.cpp +0 -176
  1446. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_test_case_registry_impl.h +0 -71
  1447. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_test_case_tracker.cpp +0 -254
  1448. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_test_case_tracker.h +0 -180
  1449. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_test_registry.cpp +0 -37
  1450. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_test_registry.h +0 -402
  1451. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_test_spec.cpp +0 -99
  1452. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_test_spec.h +0 -94
  1453. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_test_spec_parser.cpp +0 -240
  1454. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_test_spec_parser.h +0 -79
  1455. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_text.h +0 -17
  1456. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_timer.cpp +0 -74
  1457. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_timer.h +0 -30
  1458. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_to_string.hpp +0 -28
  1459. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_tostring.cpp +0 -265
  1460. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_tostring.h +0 -675
  1461. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_totals.cpp +0 -61
  1462. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_totals.h +0 -41
  1463. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_uncaught_exceptions.cpp +0 -25
  1464. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_uncaught_exceptions.h +0 -15
  1465. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_user_interfaces.h +0 -18
  1466. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_version.cpp +0 -44
  1467. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_version.h +0 -39
  1468. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_wildcard_pattern.cpp +0 -47
  1469. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_wildcard_pattern.h +0 -38
  1470. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_windows_h_proxy.h +0 -39
  1471. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_xmlwriter.cpp +0 -334
  1472. package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_xmlwriter.h +0 -116
  1473. package/deps/couchbase-cxx-client/third_party/catch2/include/reporters/catch_reporter_automake.hpp +0 -62
  1474. package/deps/couchbase-cxx-client/third_party/catch2/include/reporters/catch_reporter_bases.cpp +0 -84
  1475. package/deps/couchbase-cxx-client/third_party/catch2/include/reporters/catch_reporter_bases.hpp +0 -285
  1476. package/deps/couchbase-cxx-client/third_party/catch2/include/reporters/catch_reporter_compact.cpp +0 -290
  1477. package/deps/couchbase-cxx-client/third_party/catch2/include/reporters/catch_reporter_compact.h +0 -39
  1478. package/deps/couchbase-cxx-client/third_party/catch2/include/reporters/catch_reporter_console.cpp +0 -700
  1479. package/deps/couchbase-cxx-client/third_party/catch2/include/reporters/catch_reporter_console.h +0 -89
  1480. package/deps/couchbase-cxx-client/third_party/catch2/include/reporters/catch_reporter_junit.cpp +0 -300
  1481. package/deps/couchbase-cxx-client/third_party/catch2/include/reporters/catch_reporter_junit.h +0 -62
  1482. package/deps/couchbase-cxx-client/third_party/catch2/include/reporters/catch_reporter_listening.cpp +0 -164
  1483. package/deps/couchbase-cxx-client/third_party/catch2/include/reporters/catch_reporter_listening.h +0 -63
  1484. package/deps/couchbase-cxx-client/third_party/catch2/include/reporters/catch_reporter_sonarqube.hpp +0 -181
  1485. package/deps/couchbase-cxx-client/third_party/catch2/include/reporters/catch_reporter_tap.hpp +0 -254
  1486. package/deps/couchbase-cxx-client/third_party/catch2/include/reporters/catch_reporter_teamcity.hpp +0 -219
  1487. package/deps/couchbase-cxx-client/third_party/catch2/include/reporters/catch_reporter_xml.cpp +0 -281
  1488. package/deps/couchbase-cxx-client/third_party/catch2/include/reporters/catch_reporter_xml.h +0 -68
  1489. package/deps/couchbase-cxx-client/third_party/catch2/misc/appveyorBuildConfigurationScript.bat +0 -22
  1490. package/deps/couchbase-cxx-client/third_party/catch2/misc/appveyorMergeCoverageScript.py +0 -9
  1491. package/deps/couchbase-cxx-client/third_party/catch2/misc/appveyorTestRunScript.bat +0 -15
  1492. package/deps/couchbase-cxx-client/third_party/catch2/misc/coverage-helper.cpp +0 -142
  1493. package/deps/couchbase-cxx-client/third_party/catch2/misc/installOpenCppCoverage.ps1 +0 -19
  1494. package/deps/couchbase-cxx-client/third_party/catch2/projects/CMakeLists.txt +0 -492
  1495. package/deps/couchbase-cxx-client/third_party/catch2/projects/ExtraTests/CMakeLists.txt +0 -201
  1496. package/deps/couchbase-cxx-client/third_party/catch2/projects/ExtraTests/ToDo.txt +0 -11
  1497. package/deps/couchbase-cxx-client/third_party/catch2/projects/ExtraTests/X01-PrefixedMacros.cpp +0 -84
  1498. package/deps/couchbase-cxx-client/third_party/catch2/projects/ExtraTests/X02-DisabledMacros.cpp +0 -31
  1499. package/deps/couchbase-cxx-client/third_party/catch2/projects/ExtraTests/X03-DisabledExceptions-DefaultHandler.cpp +0 -23
  1500. package/deps/couchbase-cxx-client/third_party/catch2/projects/ExtraTests/X04-DisabledExceptions-CustomHandler.cpp +0 -33
  1501. package/deps/couchbase-cxx-client/third_party/catch2/projects/ExtraTests/X10-FallbackStringifier.cpp +0 -23
  1502. package/deps/couchbase-cxx-client/third_party/catch2/projects/ExtraTests/X11-DisableStringification.cpp +0 -16
  1503. package/deps/couchbase-cxx-client/third_party/catch2/projects/ExtraTests/X12-CustomDebugBreakMacro.cpp +0 -17
  1504. package/deps/couchbase-cxx-client/third_party/catch2/projects/ExtraTests/X20-BenchmarkingMacros.cpp +0 -125
  1505. package/deps/couchbase-cxx-client/third_party/catch2/projects/ExtraTests/X90-WindowsHeaderInclusion.cpp +0 -12
  1506. package/deps/couchbase-cxx-client/third_party/catch2/projects/SelfTest/Baselines/compact.sw.approved.txt +0 -1903
  1507. package/deps/couchbase-cxx-client/third_party/catch2/projects/SelfTest/Baselines/console.std.approved.txt +0 -1425
  1508. package/deps/couchbase-cxx-client/third_party/catch2/projects/SelfTest/Baselines/console.sw.approved.txt +0 -14183
  1509. package/deps/couchbase-cxx-client/third_party/catch2/projects/SelfTest/Baselines/console.swa4.approved.txt +0 -936
  1510. package/deps/couchbase-cxx-client/third_party/catch2/projects/SelfTest/Baselines/junit.sw.approved.txt +0 -1773
  1511. package/deps/couchbase-cxx-client/third_party/catch2/projects/SelfTest/Baselines/sonarqube.sw.approved.txt +0 -1777
  1512. package/deps/couchbase-cxx-client/third_party/catch2/projects/SelfTest/Baselines/xml.sw.approved.txt +0 -16767
  1513. package/deps/couchbase-cxx-client/third_party/catch2/projects/SelfTest/CompileTimePerfTests/10.tests.cpp +0 -13
  1514. package/deps/couchbase-cxx-client/third_party/catch2/projects/SelfTest/CompileTimePerfTests/100.tests.cpp +0 -13
  1515. package/deps/couchbase-cxx-client/third_party/catch2/projects/SelfTest/CompileTimePerfTests/All.tests.cpp +0 -15
  1516. package/deps/couchbase-cxx-client/third_party/catch2/projects/SelfTest/IntrospectiveTests/CmdLine.tests.cpp +0 -582
  1517. package/deps/couchbase-cxx-client/third_party/catch2/projects/SelfTest/IntrospectiveTests/Details.tests.cpp +0 -23
  1518. package/deps/couchbase-cxx-client/third_party/catch2/projects/SelfTest/IntrospectiveTests/GeneratorsImpl.tests.cpp +0 -352
  1519. package/deps/couchbase-cxx-client/third_party/catch2/projects/SelfTest/IntrospectiveTests/InternalBenchmark.tests.cpp +0 -405
  1520. package/deps/couchbase-cxx-client/third_party/catch2/projects/SelfTest/IntrospectiveTests/PartTracker.tests.cpp +0 -253
  1521. package/deps/couchbase-cxx-client/third_party/catch2/projects/SelfTest/IntrospectiveTests/RandomNumberGeneration.tests.cpp +0 -45
  1522. package/deps/couchbase-cxx-client/third_party/catch2/projects/SelfTest/IntrospectiveTests/String.tests.cpp +0 -150
  1523. package/deps/couchbase-cxx-client/third_party/catch2/projects/SelfTest/IntrospectiveTests/StringManip.tests.cpp +0 -67
  1524. package/deps/couchbase-cxx-client/third_party/catch2/projects/SelfTest/IntrospectiveTests/Tag.tests.cpp +0 -54
  1525. package/deps/couchbase-cxx-client/third_party/catch2/projects/SelfTest/IntrospectiveTests/ToString.tests.cpp +0 -53
  1526. package/deps/couchbase-cxx-client/third_party/catch2/projects/SelfTest/IntrospectiveTests/Xml.tests.cpp +0 -114
  1527. package/deps/couchbase-cxx-client/third_party/catch2/projects/SelfTest/SurrogateCpps/catch_console_colour.cpp +0 -3
  1528. package/deps/couchbase-cxx-client/third_party/catch2/projects/SelfTest/SurrogateCpps/catch_debugger.cpp +0 -2
  1529. package/deps/couchbase-cxx-client/third_party/catch2/projects/SelfTest/SurrogateCpps/catch_interfaces_reporter.cpp +0 -2
  1530. package/deps/couchbase-cxx-client/third_party/catch2/projects/SelfTest/SurrogateCpps/catch_option.cpp +0 -3
  1531. package/deps/couchbase-cxx-client/third_party/catch2/projects/SelfTest/SurrogateCpps/catch_stream.cpp +0 -3
  1532. package/deps/couchbase-cxx-client/third_party/catch2/projects/SelfTest/SurrogateCpps/catch_test_case_tracker.cpp +0 -2
  1533. package/deps/couchbase-cxx-client/third_party/catch2/projects/SelfTest/SurrogateCpps/catch_test_spec.cpp +0 -3
  1534. package/deps/couchbase-cxx-client/third_party/catch2/projects/SelfTest/SurrogateCpps/catch_xmlwriter.cpp +0 -4
  1535. package/deps/couchbase-cxx-client/third_party/catch2/projects/SelfTest/TestMain.cpp +0 -34
  1536. package/deps/couchbase-cxx-client/third_party/catch2/projects/SelfTest/TimingTests/Sleep.tests.cpp +0 -23
  1537. package/deps/couchbase-cxx-client/third_party/catch2/projects/SelfTest/UsageTests/Approx.tests.cpp +0 -215
  1538. package/deps/couchbase-cxx-client/third_party/catch2/projects/SelfTest/UsageTests/BDD.tests.cpp +0 -110
  1539. package/deps/couchbase-cxx-client/third_party/catch2/projects/SelfTest/UsageTests/Benchmark.tests.cpp +0 -144
  1540. package/deps/couchbase-cxx-client/third_party/catch2/projects/SelfTest/UsageTests/Class.tests.cpp +0 -137
  1541. package/deps/couchbase-cxx-client/third_party/catch2/projects/SelfTest/UsageTests/Compilation.tests.cpp +0 -269
  1542. package/deps/couchbase-cxx-client/third_party/catch2/projects/SelfTest/UsageTests/Condition.tests.cpp +0 -347
  1543. package/deps/couchbase-cxx-client/third_party/catch2/projects/SelfTest/UsageTests/Decomposition.tests.cpp +0 -39
  1544. package/deps/couchbase-cxx-client/third_party/catch2/projects/SelfTest/UsageTests/EnumToString.tests.cpp +0 -99
  1545. package/deps/couchbase-cxx-client/third_party/catch2/projects/SelfTest/UsageTests/Exception.tests.cpp +0 -210
  1546. package/deps/couchbase-cxx-client/third_party/catch2/projects/SelfTest/UsageTests/Generators.tests.cpp +0 -271
  1547. package/deps/couchbase-cxx-client/third_party/catch2/projects/SelfTest/UsageTests/Matchers.tests.cpp +0 -676
  1548. package/deps/couchbase-cxx-client/third_party/catch2/projects/SelfTest/UsageTests/Message.tests.cpp +0 -269
  1549. package/deps/couchbase-cxx-client/third_party/catch2/projects/SelfTest/UsageTests/Misc.tests.cpp +0 -493
  1550. package/deps/couchbase-cxx-client/third_party/catch2/projects/SelfTest/UsageTests/ToStringByte.tests.cpp +0 -15
  1551. package/deps/couchbase-cxx-client/third_party/catch2/projects/SelfTest/UsageTests/ToStringChrono.tests.cpp +0 -44
  1552. package/deps/couchbase-cxx-client/third_party/catch2/projects/SelfTest/UsageTests/ToStringGeneral.tests.cpp +0 -210
  1553. package/deps/couchbase-cxx-client/third_party/catch2/projects/SelfTest/UsageTests/ToStringOptional.tests.cpp +0 -23
  1554. package/deps/couchbase-cxx-client/third_party/catch2/projects/SelfTest/UsageTests/ToStringPair.tests.cpp +0 -30
  1555. package/deps/couchbase-cxx-client/third_party/catch2/projects/SelfTest/UsageTests/ToStringTuple.tests.cpp +0 -47
  1556. package/deps/couchbase-cxx-client/third_party/catch2/projects/SelfTest/UsageTests/ToStringVariant.tests.cpp +0 -91
  1557. package/deps/couchbase-cxx-client/third_party/catch2/projects/SelfTest/UsageTests/ToStringVector.tests.cpp +0 -86
  1558. package/deps/couchbase-cxx-client/third_party/catch2/projects/SelfTest/UsageTests/ToStringWhich.tests.cpp +0 -193
  1559. package/deps/couchbase-cxx-client/third_party/catch2/projects/SelfTest/UsageTests/Tricky.tests.cpp +0 -429
  1560. package/deps/couchbase-cxx-client/third_party/catch2/projects/SelfTest/UsageTests/VariadicMacros.tests.cpp +0 -29
  1561. package/deps/couchbase-cxx-client/third_party/catch2/projects/SelfTest/WarnAboutNoTests.cmake +0 -19
  1562. package/deps/couchbase-cxx-client/third_party/catch2/projects/TestScripts/testRandomOrder.py +0 -59
  1563. package/deps/couchbase-cxx-client/third_party/catch2/projects/XCode/OCTest/OCTest/CatchOCTestCase.h +0 -25
  1564. package/deps/couchbase-cxx-client/third_party/catch2/projects/XCode/OCTest/OCTest/CatchOCTestCase.mm +0 -87
  1565. package/deps/couchbase-cxx-client/third_party/catch2/projects/XCode/OCTest/OCTest/Main.mm +0 -2
  1566. package/deps/couchbase-cxx-client/third_party/catch2/projects/XCode/OCTest/OCTest/OCTest.1 +0 -79
  1567. package/deps/couchbase-cxx-client/third_party/catch2/projects/XCode/OCTest/OCTest/OCTest.mm +0 -28
  1568. package/deps/couchbase-cxx-client/third_party/catch2/projects/XCode/OCTest/OCTest/TestObj.h +0 -28
  1569. package/deps/couchbase-cxx-client/third_party/catch2/projects/XCode/OCTest/OCTest/TestObj.m +0 -25
  1570. package/deps/couchbase-cxx-client/third_party/catch2/projects/XCode/OCTest/OCTest.xcodeproj/project.pbxproj +0 -294
  1571. package/deps/couchbase-cxx-client/third_party/catch2/projects/XCode/OCTest/OCTest.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -7
  1572. package/deps/couchbase-cxx-client/third_party/catch2/projects/XCode/OCTest/OCTest.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
  1573. package/deps/couchbase-cxx-client/third_party/catch2/projects/XCode/OCTest/catch_objc_impl.mm +0 -69
  1574. package/deps/couchbase-cxx-client/third_party/catch2/scripts/approvalTests.py +0 -217
  1575. package/deps/couchbase-cxx-client/third_party/catch2/scripts/approve.py +0 -33
  1576. package/deps/couchbase-cxx-client/third_party/catch2/scripts/benchmarkCompile.py +0 -148
  1577. package/deps/couchbase-cxx-client/third_party/catch2/scripts/benchmarkRunner.py +0 -56
  1578. package/deps/couchbase-cxx-client/third_party/catch2/scripts/developBuild.py +0 -10
  1579. package/deps/couchbase-cxx-client/third_party/catch2/scripts/embed.py +0 -63
  1580. package/deps/couchbase-cxx-client/third_party/catch2/scripts/embedClara.py +0 -27
  1581. package/deps/couchbase-cxx-client/third_party/catch2/scripts/extractFeaturesFromReleaseNotes.py +0 -94
  1582. package/deps/couchbase-cxx-client/third_party/catch2/scripts/fixWhitespace.py +0 -52
  1583. package/deps/couchbase-cxx-client/third_party/catch2/scripts/generateSingleHeader.py +0 -151
  1584. package/deps/couchbase-cxx-client/third_party/catch2/scripts/majorRelease.py +0 -10
  1585. package/deps/couchbase-cxx-client/third_party/catch2/scripts/minorRelease.py +0 -10
  1586. package/deps/couchbase-cxx-client/third_party/catch2/scripts/patchRelease.py +0 -10
  1587. package/deps/couchbase-cxx-client/third_party/catch2/scripts/releaseCommon.py +0 -168
  1588. package/deps/couchbase-cxx-client/third_party/catch2/scripts/releaseNotes.py +0 -65
  1589. package/deps/couchbase-cxx-client/third_party/catch2/scripts/scriptCommon.py +0 -31
  1590. package/deps/couchbase-cxx-client/third_party/catch2/scripts/updateDocumentToC.py +0 -449
  1591. package/deps/couchbase-cxx-client/third_party/catch2/scripts/updateWandbox.py +0 -53
  1592. package/deps/couchbase-cxx-client/third_party/catch2/single_include/catch2/catch.hpp +0 -17959
  1593. package/deps/couchbase-cxx-client/third_party/catch2/single_include/catch2/catch_reporter_automake.hpp +0 -62
  1594. package/deps/couchbase-cxx-client/third_party/catch2/single_include/catch2/catch_reporter_sonarqube.hpp +0 -181
  1595. package/deps/couchbase-cxx-client/third_party/catch2/single_include/catch2/catch_reporter_tap.hpp +0 -254
  1596. package/deps/couchbase-cxx-client/third_party/catch2/single_include/catch2/catch_reporter_teamcity.hpp +0 -219
  1597. package/deps/couchbase-cxx-client/third_party/catch2/src/catch_with_main.cpp +0 -2
  1598. package/deps/couchbase-cxx-client/third_party/snappy/.appveyor.yml +0 -36
  1599. package/deps/couchbase-cxx-client/third_party/snappy/.travis.yml +0 -94
  1600. /package/deps/couchbase-cxx-client/third_party/catch2/{artwork → data/artwork}/catch2-c-logo.png +0 -0
  1601. /package/deps/couchbase-cxx-client/third_party/catch2/{artwork → data/artwork}/catch2-hand-logo.png +0 -0
  1602. /package/deps/couchbase-cxx-client/third_party/catch2/{artwork → data/artwork}/catch2-logo-small.png +0 -0
  1603. /package/deps/couchbase-cxx-client/third_party/catch2/{contrib → extras}/ParseAndAddCatchTests.cmake +0 -0
  1604. /package/deps/couchbase-cxx-client/third_party/catch2/{contrib → extras}/gdbinit +0 -0
  1605. /package/deps/couchbase-cxx-client/third_party/catch2/{contrib → extras}/lldbinit +0 -0
  1606. /package/deps/couchbase-cxx-client/third_party/catch2/{projects → tests}/SelfTest/Baselines/automake.std.approved.txt +0 -0
  1607. /package/deps/couchbase-cxx-client/third_party/catch2/{projects → tests}/SelfTest/Misc/invalid-test-names.input +0 -0
  1608. /package/deps/couchbase-cxx-client/third_party/catch2/{projects → tests}/SelfTest/Misc/plain-old-tests.input +0 -0
  1609. /package/deps/couchbase-cxx-client/third_party/catch2/{projects → tests}/SelfTest/Misc/special-characters-in-file.input +0 -0
  1610. /package/deps/couchbase-cxx-client/third_party/catch2/{misc → tools/misc}/CMakeLists.txt +0 -0
@@ -26,21 +26,9 @@
26
26
  // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27
27
  // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28
28
 
29
- #include "snappy.h"
30
29
  #include "snappy-internal.h"
31
30
  #include "snappy-sinksource.h"
32
-
33
- #if !defined(SNAPPY_HAVE_SSSE3)
34
- // __SSSE3__ is defined by GCC and Clang. Visual Studio doesn't target SIMD
35
- // support between SSE2 and AVX (so SSSE3 instructions require AVX support), and
36
- // defines __AVX__ when AVX support is available.
37
- #if defined(__SSSE3__) || defined(__AVX__)
38
- #define SNAPPY_HAVE_SSSE3 1
39
- #else
40
- #define SNAPPY_HAVE_SSSE3 0
41
- #endif
42
- #endif // !defined(SNAPPY_HAVE_SSSE3)
43
-
31
+ #include "snappy.h"
44
32
  #if !defined(SNAPPY_HAVE_BMI2)
45
33
  // __BMI2__ is defined by GCC and Clang. Visual Studio doesn't target BMI2
46
34
  // specifically, but it does define __AVX2__ when AVX2 support is available.
@@ -56,46 +44,145 @@
56
44
  #endif
57
45
  #endif // !defined(SNAPPY_HAVE_BMI2)
58
46
 
59
- #if SNAPPY_HAVE_SSSE3
60
- // Please do not replace with <x86intrin.h>. or with headers that assume more
61
- // advanced SSE versions without checking with all the OWNERS.
62
- #include <tmmintrin.h>
47
+ #if !defined(SNAPPY_HAVE_X86_CRC32)
48
+ #if defined(__SSE4_2__)
49
+ #define SNAPPY_HAVE_X86_CRC32 1
50
+ #else
51
+ #define SNAPPY_HAVE_X86_CRC32 0
63
52
  #endif
53
+ #endif // !defined(SNAPPY_HAVE_X86_CRC32)
64
54
 
65
- #if SNAPPY_HAVE_BMI2
55
+ #if !defined(SNAPPY_HAVE_NEON_CRC32)
56
+ #if SNAPPY_HAVE_NEON && defined(__ARM_FEATURE_CRC32)
57
+ #define SNAPPY_HAVE_NEON_CRC32 1
58
+ #else
59
+ #define SNAPPY_HAVE_NEON_CRC32 0
60
+ #endif
61
+ #endif // !defined(SNAPPY_HAVE_NEON_CRC32)
62
+
63
+ #if SNAPPY_HAVE_BMI2 || SNAPPY_HAVE_X86_CRC32
66
64
  // Please do not replace with <x86intrin.h>. or with headers that assume more
67
65
  // advanced SSE versions without checking with all the OWNERS.
68
66
  #include <immintrin.h>
67
+ #elif SNAPPY_HAVE_NEON_CRC32
68
+ #include <arm_acle.h>
69
69
  #endif
70
70
 
71
- #include <stdio.h>
71
+ #if defined(__GNUC__)
72
+ #define SNAPPY_PREFETCH(ptr) __builtin_prefetch(ptr, 0, 3)
73
+ #else
74
+ #define SNAPPY_PREFETCH(ptr) (void)(ptr)
75
+ #endif
72
76
 
73
77
  #include <algorithm>
78
+ #include <array>
79
+ #include <cstddef>
80
+ #include <cstdint>
81
+ #include <cstdio>
82
+ #include <cstring>
74
83
  #include <string>
84
+ #include <utility>
75
85
  #include <vector>
76
86
 
77
87
  namespace snappy {
78
88
 
89
+ namespace {
90
+
91
+ // The amount of slop bytes writers are using for unconditional copies.
92
+ constexpr int kSlopBytes = 64;
93
+
94
+ using internal::char_table;
79
95
  using internal::COPY_1_BYTE_OFFSET;
80
96
  using internal::COPY_2_BYTE_OFFSET;
81
- using internal::LITERAL;
82
- using internal::char_table;
97
+ using internal::COPY_4_BYTE_OFFSET;
83
98
  using internal::kMaximumTagLength;
99
+ using internal::LITERAL;
100
+ #if SNAPPY_HAVE_VECTOR_BYTE_SHUFFLE
101
+ using internal::V128;
102
+ using internal::V128_Load;
103
+ using internal::V128_LoadU;
104
+ using internal::V128_Shuffle;
105
+ using internal::V128_StoreU;
106
+ using internal::V128_DupChar;
107
+ #endif
108
+
109
+ // We translate the information encoded in a tag through a lookup table to a
110
+ // format that requires fewer instructions to decode. Effectively we store
111
+ // the length minus the tag part of the offset. The lowest significant byte
112
+ // thus stores the length. While total length - offset is given by
113
+ // entry - ExtractOffset(type). The nice thing is that the subtraction
114
+ // immediately sets the flags for the necessary check that offset >= length.
115
+ // This folds the cmp with sub. We engineer the long literals and copy-4 to
116
+ // always fail this check, so their presence doesn't affect the fast path.
117
+ // To prevent literals from triggering the guard against offset < length (offset
118
+ // does not apply to literals) the table is giving them a spurious offset of
119
+ // 256.
120
+ inline constexpr int16_t MakeEntry(int16_t len, int16_t offset) {
121
+ return len - (offset << 8);
122
+ }
123
+
124
+ inline constexpr int16_t LengthMinusOffset(int data, int type) {
125
+ return type == 3 ? 0xFF // copy-4 (or type == 3)
126
+ : type == 2 ? MakeEntry(data + 1, 0) // copy-2
127
+ : type == 1 ? MakeEntry((data & 7) + 4, data >> 3) // copy-1
128
+ : data < 60 ? MakeEntry(data + 1, 1) // note spurious offset.
129
+ : 0xFF; // long literal
130
+ }
131
+
132
+ inline constexpr int16_t LengthMinusOffset(uint8_t tag) {
133
+ return LengthMinusOffset(tag >> 2, tag & 3);
134
+ }
135
+
136
+ template <size_t... Ints>
137
+ struct index_sequence {};
138
+
139
+ template <std::size_t N, size_t... Is>
140
+ struct make_index_sequence : make_index_sequence<N - 1, N - 1, Is...> {};
141
+
142
+ template <size_t... Is>
143
+ struct make_index_sequence<0, Is...> : index_sequence<Is...> {};
84
144
 
85
- // Any hash function will produce a valid compressed bitstream, but a good
86
- // hash function reduces the number of collisions and thus yields better
87
- // compression for compressible input, and more speed for incompressible
88
- // input. Of course, it doesn't hurt if the hash function is reasonably fast
89
- // either, as it gets called a lot.
90
- static inline uint32 HashBytes(uint32 bytes, int shift) {
91
- uint32 kMul = 0x1e35a7bd;
92
- return (bytes * kMul) >> shift;
145
+ template <size_t... seq>
146
+ constexpr std::array<int16_t, 256> MakeTable(index_sequence<seq...>) {
147
+ return std::array<int16_t, 256>{LengthMinusOffset(seq)...};
93
148
  }
94
- static inline uint32 Hash(const char* p, int shift) {
95
- return HashBytes(UNALIGNED_LOAD32(p), shift);
149
+
150
+ alignas(64) const std::array<int16_t, 256> kLengthMinusOffset =
151
+ MakeTable(make_index_sequence<256>{});
152
+
153
+ // Given a table of uint16_t whose size is mask / 2 + 1, return a pointer to the
154
+ // relevant entry, if any, for the given bytes. Any hash function will do,
155
+ // but a good hash function reduces the number of collisions and thus yields
156
+ // better compression for compressible input.
157
+ //
158
+ // REQUIRES: mask is 2 * (table_size - 1), and table_size is a power of two.
159
+ inline uint16_t* TableEntry(uint16_t* table, uint32_t bytes, uint32_t mask) {
160
+ // Our choice is quicker-and-dirtier than the typical hash function;
161
+ // empirically, that seems beneficial. The upper bits of kMagic * bytes are a
162
+ // higher-quality hash than the lower bits, so when using kMagic * bytes we
163
+ // also shift right to get a higher-quality end result. There's no similar
164
+ // issue with a CRC because all of the output bits of a CRC are equally good
165
+ // "hashes." So, a CPU instruction for CRC, if available, tends to be a good
166
+ // choice.
167
+ #if SNAPPY_HAVE_NEON_CRC32
168
+ // We use mask as the second arg to the CRC function, as it's about to
169
+ // be used anyway; it'd be equally correct to use 0 or some constant.
170
+ // Mathematically, _mm_crc32_u32 (or similar) is a function of the
171
+ // xor of its arguments.
172
+ const uint32_t hash = __crc32cw(bytes, mask);
173
+ #elif SNAPPY_HAVE_X86_CRC32
174
+ const uint32_t hash = _mm_crc32_u32(bytes, mask);
175
+ #else
176
+ constexpr uint32_t kMagic = 0x1e35a7bd;
177
+ const uint32_t hash = (kMagic * bytes) >> (31 - kMaxHashTableBits);
178
+ #endif
179
+ return reinterpret_cast<uint16_t*>(reinterpret_cast<uintptr_t>(table) +
180
+ (hash & mask));
96
181
  }
97
182
 
98
- size_t MaxCompressedLength(size_t source_len) {
183
+ } // namespace
184
+
185
+ size_t MaxCompressedLength(size_t source_bytes) {
99
186
  // Compressed data can be defined as:
100
187
  // compressed := item* literal*
101
188
  // item := literal* copy
@@ -116,24 +203,34 @@ size_t MaxCompressedLength(size_t source_len) {
116
203
  // I.e., 6 bytes of input turn into 7 bytes of "compressed" data.
117
204
  //
118
205
  // This last factor dominates the blowup, so the final estimate is:
119
- return 32 + source_len + source_len/6;
206
+ return 32 + source_bytes + source_bytes / 6;
120
207
  }
121
208
 
122
209
  namespace {
123
210
 
124
211
  void UnalignedCopy64(const void* src, void* dst) {
125
212
  char tmp[8];
126
- memcpy(tmp, src, 8);
127
- memcpy(dst, tmp, 8);
213
+ std::memcpy(tmp, src, 8);
214
+ std::memcpy(dst, tmp, 8);
128
215
  }
129
216
 
130
217
  void UnalignedCopy128(const void* src, void* dst) {
131
- // memcpy gets vectorized when the appropriate compiler options are used.
132
- // For example, x86 compilers targeting SSE2+ will optimize to an SSE2 load
133
- // and store.
218
+ // std::memcpy() gets vectorized when the appropriate compiler options are
219
+ // used. For example, x86 compilers targeting SSE2+ will optimize to an SSE2
220
+ // load and store.
134
221
  char tmp[16];
135
- memcpy(tmp, src, 16);
136
- memcpy(dst, tmp, 16);
222
+ std::memcpy(tmp, src, 16);
223
+ std::memcpy(dst, tmp, 16);
224
+ }
225
+
226
+ template <bool use_16bytes_chunk>
227
+ inline void ConditionalUnalignedCopy128(const char* src, char* dst) {
228
+ if (use_16bytes_chunk) {
229
+ UnalignedCopy128(src, dst);
230
+ } else {
231
+ UnalignedCopy64(src, dst);
232
+ UnalignedCopy64(src + 8, dst + 8);
233
+ }
137
234
  }
138
235
 
139
236
  // Copy [src, src+(op_limit-op)) to [op, (op_limit-op)) a byte at a time. Used
@@ -145,7 +242,8 @@ void UnalignedCopy128(const void* src, void* dst) {
145
242
  // After IncrementalCopySlow(src, op, op_limit), the result will have eleven
146
243
  // copies of "ab"
147
244
  // ababababababababababab
148
- // Note that this does not match the semantics of either memcpy() or memmove().
245
+ // Note that this does not match the semantics of either std::memcpy() or
246
+ // std::memmove().
149
247
  inline char* IncrementalCopySlow(const char* src, char* op,
150
248
  char* const op_limit) {
151
249
  // TODO: Remove pragma when LLVM is aware this
@@ -160,39 +258,179 @@ inline char* IncrementalCopySlow(const char* src, char* op,
160
258
  return op_limit;
161
259
  }
162
260
 
163
- #if SNAPPY_HAVE_SSSE3
261
+ #if SNAPPY_HAVE_VECTOR_BYTE_SHUFFLE
262
+
263
+ // Computes the bytes for shuffle control mask (please read comments on
264
+ // 'pattern_generation_masks' as well) for the given index_offset and
265
+ // pattern_size. For example, when the 'offset' is 6, it will generate a
266
+ // repeating pattern of size 6. So, the first 16 byte indexes will correspond to
267
+ // the pattern-bytes {0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3} and the
268
+ // next 16 byte indexes will correspond to the pattern-bytes {4, 5, 0, 1, 2, 3,
269
+ // 4, 5, 0, 1, 2, 3, 4, 5, 0, 1}. These byte index sequences are generated by
270
+ // calling MakePatternMaskBytes(0, 6, index_sequence<16>()) and
271
+ // MakePatternMaskBytes(16, 6, index_sequence<16>()) respectively.
272
+ template <size_t... indexes>
273
+ inline constexpr std::array<char, sizeof...(indexes)> MakePatternMaskBytes(
274
+ int index_offset, int pattern_size, index_sequence<indexes...>) {
275
+ return {static_cast<char>((index_offset + indexes) % pattern_size)...};
276
+ }
277
+
278
+ // Computes the shuffle control mask bytes array for given pattern-sizes and
279
+ // returns an array.
280
+ template <size_t... pattern_sizes_minus_one>
281
+ inline constexpr std::array<std::array<char, sizeof(V128)>,
282
+ sizeof...(pattern_sizes_minus_one)>
283
+ MakePatternMaskBytesTable(int index_offset,
284
+ index_sequence<pattern_sizes_minus_one...>) {
285
+ return {
286
+ MakePatternMaskBytes(index_offset, pattern_sizes_minus_one + 1,
287
+ make_index_sequence</*indexes=*/sizeof(V128)>())...};
288
+ }
164
289
 
165
- // This is a table of shuffle control masks that can be used as the source
290
+ // This is an array of shuffle control masks that can be used as the source
166
291
  // operand for PSHUFB to permute the contents of the destination XMM register
167
292
  // into a repeating byte pattern.
168
- alignas(16) const char pshufb_fill_patterns[7][16] = {
169
- {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
170
- {0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1},
171
- {0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0},
172
- {0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3},
173
- {0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0},
174
- {0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3},
175
- {0, 1, 2, 3, 4, 5, 6, 0, 1, 2, 3, 4, 5, 6, 0, 1},
176
- };
293
+ alignas(16) constexpr std::array<std::array<char, sizeof(V128)>,
294
+ 16> pattern_generation_masks =
295
+ MakePatternMaskBytesTable(
296
+ /*index_offset=*/0,
297
+ /*pattern_sizes_minus_one=*/make_index_sequence<16>());
298
+
299
+ // Similar to 'pattern_generation_masks', this table is used to "rotate" the
300
+ // pattern so that we can copy the *next 16 bytes* consistent with the pattern.
301
+ // Basically, pattern_reshuffle_masks is a continuation of
302
+ // pattern_generation_masks. It follows that, pattern_reshuffle_masks is same as
303
+ // pattern_generation_masks for offsets 1, 2, 4, 8 and 16.
304
+ alignas(16) constexpr std::array<std::array<char, sizeof(V128)>,
305
+ 16> pattern_reshuffle_masks =
306
+ MakePatternMaskBytesTable(
307
+ /*index_offset=*/16,
308
+ /*pattern_sizes_minus_one=*/make_index_sequence<16>());
309
+
310
+ SNAPPY_ATTRIBUTE_ALWAYS_INLINE
311
+ static inline V128 LoadPattern(const char* src, const size_t pattern_size) {
312
+ V128 generation_mask = V128_Load(reinterpret_cast<const V128*>(
313
+ pattern_generation_masks[pattern_size - 1].data()));
314
+ // Uninitialized bytes are masked out by the shuffle mask.
315
+ // TODO: remove annotation and macro defs once MSan is fixed.
316
+ SNAPPY_ANNOTATE_MEMORY_IS_INITIALIZED(src + pattern_size, 16 - pattern_size);
317
+ return V128_Shuffle(V128_LoadU(reinterpret_cast<const V128*>(src)),
318
+ generation_mask);
319
+ }
177
320
 
178
- #endif // SNAPPY_HAVE_SSSE3
321
+ SNAPPY_ATTRIBUTE_ALWAYS_INLINE
322
+ static inline std::pair<V128 /* pattern */, V128 /* reshuffle_mask */>
323
+ LoadPatternAndReshuffleMask(const char* src, const size_t pattern_size) {
324
+ V128 pattern = LoadPattern(src, pattern_size);
179
325
 
180
- // Copy [src, src+(op_limit-op)) to [op, (op_limit-op)) but faster than
326
+ // This mask will generate the next 16 bytes in-place. Doing so enables us to
327
+ // write data by at most 4 V128_StoreU.
328
+ //
329
+ // For example, suppose pattern is: abcdefabcdefabcd
330
+ // Shuffling with this mask will generate: efabcdefabcdefab
331
+ // Shuffling again will generate: cdefabcdefabcdef
332
+ V128 reshuffle_mask = V128_Load(reinterpret_cast<const V128*>(
333
+ pattern_reshuffle_masks[pattern_size - 1].data()));
334
+ return {pattern, reshuffle_mask};
335
+ }
336
+
337
+ #endif // SNAPPY_HAVE_VECTOR_BYTE_SHUFFLE
338
+
339
+ // Fallback for when we need to copy while extending the pattern, for example
340
+ // copying 10 bytes from 3 positions back abc -> abcabcabcabca.
341
+ //
342
+ // REQUIRES: [dst - offset, dst + 64) is a valid address range.
343
+ SNAPPY_ATTRIBUTE_ALWAYS_INLINE
344
+ static inline bool Copy64BytesWithPatternExtension(char* dst, size_t offset) {
345
+ #if SNAPPY_HAVE_VECTOR_BYTE_SHUFFLE
346
+ if (SNAPPY_PREDICT_TRUE(offset <= 16)) {
347
+ switch (offset) {
348
+ case 0:
349
+ return false;
350
+ case 1: {
351
+ // TODO: Ideally we should memset, move back once the
352
+ // codegen issues are fixed.
353
+ V128 pattern = V128_DupChar(dst[-1]);
354
+ for (int i = 0; i < 4; i++) {
355
+ V128_StoreU(reinterpret_cast<V128*>(dst + 16 * i), pattern);
356
+ }
357
+ return true;
358
+ }
359
+ case 2:
360
+ case 4:
361
+ case 8:
362
+ case 16: {
363
+ V128 pattern = LoadPattern(dst - offset, offset);
364
+ for (int i = 0; i < 4; i++) {
365
+ V128_StoreU(reinterpret_cast<V128*>(dst + 16 * i), pattern);
366
+ }
367
+ return true;
368
+ }
369
+ default: {
370
+ auto pattern_and_reshuffle_mask =
371
+ LoadPatternAndReshuffleMask(dst - offset, offset);
372
+ V128 pattern = pattern_and_reshuffle_mask.first;
373
+ V128 reshuffle_mask = pattern_and_reshuffle_mask.second;
374
+ for (int i = 0; i < 4; i++) {
375
+ V128_StoreU(reinterpret_cast<V128*>(dst + 16 * i), pattern);
376
+ pattern = V128_Shuffle(pattern, reshuffle_mask);
377
+ }
378
+ return true;
379
+ }
380
+ }
381
+ }
382
+ #else
383
+ if (SNAPPY_PREDICT_TRUE(offset < 16)) {
384
+ if (SNAPPY_PREDICT_FALSE(offset == 0)) return false;
385
+ // Extend the pattern to the first 16 bytes.
386
+ // The simpler formulation of `dst[i - offset]` induces undefined behavior.
387
+ for (int i = 0; i < 16; i++) dst[i] = (dst - offset)[i];
388
+ // Find a multiple of pattern >= 16.
389
+ static std::array<uint8_t, 16> pattern_sizes = []() {
390
+ std::array<uint8_t, 16> res;
391
+ for (int i = 1; i < 16; i++) res[i] = (16 / i + 1) * i;
392
+ return res;
393
+ }();
394
+ offset = pattern_sizes[offset];
395
+ for (int i = 1; i < 4; i++) {
396
+ std::memcpy(dst + i * 16, dst + i * 16 - offset, 16);
397
+ }
398
+ return true;
399
+ }
400
+ #endif // SNAPPY_HAVE_VECTOR_BYTE_SHUFFLE
401
+
402
+ // Very rare.
403
+ for (int i = 0; i < 4; i++) {
404
+ std::memcpy(dst + i * 16, dst + i * 16 - offset, 16);
405
+ }
406
+ return true;
407
+ }
408
+
409
+ // Copy [src, src+(op_limit-op)) to [op, op_limit) but faster than
181
410
  // IncrementalCopySlow. buf_limit is the address past the end of the writable
182
411
  // region of the buffer.
183
412
  inline char* IncrementalCopy(const char* src, char* op, char* const op_limit,
184
413
  char* const buf_limit) {
414
+ #if SNAPPY_HAVE_VECTOR_BYTE_SHUFFLE
415
+ constexpr int big_pattern_size_lower_bound = 16;
416
+ #else
417
+ constexpr int big_pattern_size_lower_bound = 8;
418
+ #endif
419
+
185
420
  // Terminology:
186
421
  //
187
422
  // slop = buf_limit - op
188
423
  // pat = op - src
189
- // len = limit - op
424
+ // len = op_limit - op
190
425
  assert(src < op);
191
- assert(op <= op_limit);
426
+ assert(op < op_limit);
192
427
  assert(op_limit <= buf_limit);
193
- // NOTE: The compressor always emits 4 <= len <= 64. It is ok to assume that
194
- // to optimize this function but we have to also handle other cases in case
195
- // the input does not satisfy these conditions.
428
+ // NOTE: The copy tags use 3 or 6 bits to store the copy length, so len <= 64.
429
+ assert(op_limit - op <= 64);
430
+ // NOTE: In practice the compressor always emits len >= 4, so it is ok to
431
+ // assume that to optimize this function, but this is not guaranteed by the
432
+ // compression format, so we have to also handle len < 4 in case the input
433
+ // does not satisfy these conditions.
196
434
 
197
435
  size_t pattern_size = op - src;
198
436
  // The cases are split into different branches to allow the branch predictor,
@@ -216,43 +454,78 @@ inline char* IncrementalCopy(const char* src, char* op, char* const op_limit,
216
454
  // input. In general if we always predict len <= 16 it would be an ok
217
455
  // prediction.
218
456
  //
219
- // In order to be fast we want a pattern >= 8 bytes and an unrolled loop
220
- // copying 2x 8 bytes at a time.
221
-
222
- // Handle the uncommon case where pattern is less than 8 bytes.
223
- if (SNAPPY_PREDICT_FALSE(pattern_size < 8)) {
224
- #if SNAPPY_HAVE_SSSE3
457
+ // In order to be fast we want a pattern >= 16 bytes (or 8 bytes in non-SSE)
458
+ // and an unrolled loop copying 1x 16 bytes (or 2x 8 bytes in non-SSE) at a
459
+ // time.
460
+
461
+ // Handle the uncommon case where pattern is less than 16 (or 8 in non-SSE)
462
+ // bytes.
463
+ if (pattern_size < big_pattern_size_lower_bound) {
464
+ #if SNAPPY_HAVE_VECTOR_BYTE_SHUFFLE
225
465
  // Load the first eight bytes into an 128-bit XMM register, then use PSHUFB
226
466
  // to permute the register's contents in-place into a repeating sequence of
227
467
  // the first "pattern_size" bytes.
228
468
  // For example, suppose:
229
469
  // src == "abc"
230
470
  // op == op + 3
231
- // After _mm_shuffle_epi8(), "pattern" will have five copies of "abc"
471
+ // After V128_Shuffle(), "pattern" will have five copies of "abc"
232
472
  // followed by one byte of slop: abcabcabcabcabca.
233
473
  //
234
474
  // The non-SSE fallback implementation suffers from store-forwarding stalls
235
475
  // because its loads and stores partly overlap. By expanding the pattern
236
476
  // in-place, we avoid the penalty.
237
- if (SNAPPY_PREDICT_TRUE(op <= buf_limit - 16)) {
238
- const __m128i shuffle_mask = _mm_load_si128(
239
- reinterpret_cast<const __m128i*>(pshufb_fill_patterns)
240
- + pattern_size - 1);
241
- const __m128i pattern = _mm_shuffle_epi8(
242
- _mm_loadl_epi64(reinterpret_cast<const __m128i*>(src)), shuffle_mask);
243
- // Uninitialized bytes are masked out by the shuffle mask.
244
- // TODO: remove annotation and macro defs once MSan is fixed.
245
- SNAPPY_ANNOTATE_MEMORY_IS_INITIALIZED(&pattern, sizeof(pattern));
246
- pattern_size *= 16 / pattern_size;
247
- char* op_end = std::min(op_limit, buf_limit - 15);
248
- while (op < op_end) {
249
- _mm_storeu_si128(reinterpret_cast<__m128i*>(op), pattern);
250
- op += pattern_size;
477
+
478
+ // Typically, the op_limit is the gating factor so try to simplify the loop
479
+ // based on that.
480
+ if (SNAPPY_PREDICT_TRUE(op_limit <= buf_limit - 15)) {
481
+ auto pattern_and_reshuffle_mask =
482
+ LoadPatternAndReshuffleMask(src, pattern_size);
483
+ V128 pattern = pattern_and_reshuffle_mask.first;
484
+ V128 reshuffle_mask = pattern_and_reshuffle_mask.second;
485
+
486
+ // There is at least one, and at most four 16-byte blocks. Writing four
487
+ // conditionals instead of a loop allows FDO to layout the code with
488
+ // respect to the actual probabilities of each length.
489
+ // TODO: Replace with loop with trip count hint.
490
+ V128_StoreU(reinterpret_cast<V128*>(op), pattern);
491
+
492
+ if (op + 16 < op_limit) {
493
+ pattern = V128_Shuffle(pattern, reshuffle_mask);
494
+ V128_StoreU(reinterpret_cast<V128*>(op + 16), pattern);
251
495
  }
252
- if (SNAPPY_PREDICT_TRUE(op >= op_limit)) return op_limit;
496
+ if (op + 32 < op_limit) {
497
+ pattern = V128_Shuffle(pattern, reshuffle_mask);
498
+ V128_StoreU(reinterpret_cast<V128*>(op + 32), pattern);
499
+ }
500
+ if (op + 48 < op_limit) {
501
+ pattern = V128_Shuffle(pattern, reshuffle_mask);
502
+ V128_StoreU(reinterpret_cast<V128*>(op + 48), pattern);
503
+ }
504
+ return op_limit;
505
+ }
506
+ char* const op_end = buf_limit - 15;
507
+ if (SNAPPY_PREDICT_TRUE(op < op_end)) {
508
+ auto pattern_and_reshuffle_mask =
509
+ LoadPatternAndReshuffleMask(src, pattern_size);
510
+ V128 pattern = pattern_and_reshuffle_mask.first;
511
+ V128 reshuffle_mask = pattern_and_reshuffle_mask.second;
512
+
513
+ // This code path is relatively cold however so we save code size
514
+ // by avoiding unrolling and vectorizing.
515
+ //
516
+ // TODO: Remove pragma when when cold regions don't get
517
+ // vectorized or unrolled.
518
+ #ifdef __clang__
519
+ #pragma clang loop unroll(disable)
520
+ #endif
521
+ do {
522
+ V128_StoreU(reinterpret_cast<V128*>(op), pattern);
523
+ pattern = V128_Shuffle(pattern, reshuffle_mask);
524
+ op += 16;
525
+ } while (SNAPPY_PREDICT_TRUE(op < op_end));
253
526
  }
254
- return IncrementalCopySlow(src, op, op_limit);
255
- #else // !SNAPPY_HAVE_SSSE3
527
+ return IncrementalCopySlow(op - pattern_size, op, op_limit);
528
+ #else // !SNAPPY_HAVE_VECTOR_BYTE_SHUFFLE
256
529
  // If plenty of buffer space remains, expand the pattern to at least 8
257
530
  // bytes. The way the following loop is written, we need 8 bytes of buffer
258
531
  // space if pattern_size >= 4, 11 bytes if pattern_size is 1 or 3, and 10
@@ -269,36 +542,32 @@ inline char* IncrementalCopy(const char* src, char* op, char* const op_limit,
269
542
  } else {
270
543
  return IncrementalCopySlow(src, op, op_limit);
271
544
  }
272
- #endif // SNAPPY_HAVE_SSSE3
545
+ #endif // SNAPPY_HAVE_VECTOR_BYTE_SHUFFLE
273
546
  }
274
- assert(pattern_size >= 8);
547
+ assert(pattern_size >= big_pattern_size_lower_bound);
548
+ constexpr bool use_16bytes_chunk = big_pattern_size_lower_bound == 16;
275
549
 
276
- // Copy 2x 8 bytes at a time. Because op - src can be < 16, a single
277
- // UnalignedCopy128 might overwrite data in op. UnalignedCopy64 is safe
278
- // because expanding the pattern to at least 8 bytes guarantees that
279
- // op - src >= 8.
550
+ // Copy 1x 16 bytes (or 2x 8 bytes in non-SSE) at a time. Because op - src can
551
+ // be < 16 in non-SSE, a single UnalignedCopy128 might overwrite data in op.
552
+ // UnalignedCopy64 is safe because expanding the pattern to at least 8 bytes
553
+ // guarantees that op - src >= 8.
280
554
  //
281
555
  // Typically, the op_limit is the gating factor so try to simplify the loop
282
556
  // based on that.
283
- if (SNAPPY_PREDICT_TRUE(op_limit <= buf_limit - 16)) {
557
+ if (SNAPPY_PREDICT_TRUE(op_limit <= buf_limit - 15)) {
284
558
  // There is at least one, and at most four 16-byte blocks. Writing four
285
559
  // conditionals instead of a loop allows FDO to layout the code with respect
286
560
  // to the actual probabilities of each length.
287
561
  // TODO: Replace with loop with trip count hint.
288
- UnalignedCopy64(src, op);
289
- UnalignedCopy64(src + 8, op + 8);
290
-
562
+ ConditionalUnalignedCopy128<use_16bytes_chunk>(src, op);
291
563
  if (op + 16 < op_limit) {
292
- UnalignedCopy64(src + 16, op + 16);
293
- UnalignedCopy64(src + 24, op + 24);
564
+ ConditionalUnalignedCopy128<use_16bytes_chunk>(src + 16, op + 16);
294
565
  }
295
566
  if (op + 32 < op_limit) {
296
- UnalignedCopy64(src + 32, op + 32);
297
- UnalignedCopy64(src + 40, op + 40);
567
+ ConditionalUnalignedCopy128<use_16bytes_chunk>(src + 32, op + 32);
298
568
  }
299
569
  if (op + 48 < op_limit) {
300
- UnalignedCopy64(src + 48, op + 48);
301
- UnalignedCopy64(src + 56, op + 56);
570
+ ConditionalUnalignedCopy128<use_16bytes_chunk>(src + 48, op + 48);
302
571
  }
303
572
  return op_limit;
304
573
  }
@@ -312,12 +581,10 @@ inline char* IncrementalCopy(const char* src, char* op, char* const op_limit,
312
581
  #ifdef __clang__
313
582
  #pragma clang loop unroll(disable)
314
583
  #endif
315
- for (char *op_end = buf_limit - 16; op < op_end; op += 16, src += 16) {
316
- UnalignedCopy64(src, op);
317
- UnalignedCopy64(src + 8, op + 8);
584
+ for (char* op_end = buf_limit - 16; op < op_end; op += 16, src += 16) {
585
+ ConditionalUnalignedCopy128<use_16bytes_chunk>(src, op);
318
586
  }
319
- if (op >= op_limit)
320
- return op_limit;
587
+ if (op >= op_limit) return op_limit;
321
588
 
322
589
  // We only take this branch if we didn't have enough slop and we can do a
323
590
  // single 8 byte copy.
@@ -332,11 +599,9 @@ inline char* IncrementalCopy(const char* src, char* op, char* const op_limit,
332
599
  } // namespace
333
600
 
334
601
  template <bool allow_fast_path>
335
- static inline char* EmitLiteral(char* op,
336
- const char* literal,
337
- int len) {
602
+ static inline char* EmitLiteral(char* op, const char* literal, int len) {
338
603
  // The vast majority of copies are below 16 bytes, for which a
339
- // call to memcpy is overkill. This fast path can sometimes
604
+ // call to std::memcpy() is overkill. This fast path can sometimes
340
605
  // copy up to 15 bytes too much, but that is okay in the
341
606
  // main loop, since we have a bit to go on for both sides:
342
607
  //
@@ -345,7 +610,7 @@ static inline char* EmitLiteral(char* op,
345
610
  // if not, allow_fast_path = false.
346
611
  // - The output will always have 32 spare bytes (see
347
612
  // MaxCompressedLength).
348
- assert(len > 0); // Zero-length literals are disallowed
613
+ assert(len > 0); // Zero-length literals are disallowed
349
614
  int n = len - 1;
350
615
  if (allow_fast_path && len <= 16) {
351
616
  // Fits in tag byte
@@ -366,11 +631,23 @@ static inline char* EmitLiteral(char* op,
366
631
  // Encode in upcoming bytes.
367
632
  // Write 4 bytes, though we may care about only 1 of them. The output buffer
368
633
  // is guaranteed to have at least 3 more spaces left as 'len >= 61' holds
369
- // here and there is a memcpy of size 'len' below.
634
+ // here and there is a std::memcpy() of size 'len' below.
370
635
  LittleEndian::Store32(op, n);
371
636
  op += count;
372
637
  }
373
- memcpy(op, literal, len);
638
+ // When allow_fast_path is true, we can overwrite up to 16 bytes.
639
+ if (allow_fast_path) {
640
+ char* destination = op;
641
+ const char* source = literal;
642
+ const char* end = destination + len;
643
+ do {
644
+ std::memcpy(destination, source, 16);
645
+ destination += 16;
646
+ source += 16;
647
+ } while (destination < end);
648
+ } else {
649
+ std::memcpy(op, literal, len);
650
+ }
374
651
  return op + len;
375
652
  }
376
653
 
@@ -381,15 +658,22 @@ static inline char* EmitCopyAtMost64(char* op, size_t offset, size_t len) {
381
658
  assert(offset < 65536);
382
659
  assert(len_less_than_12 == (len < 12));
383
660
 
384
- if (len_less_than_12 && SNAPPY_PREDICT_TRUE(offset < 2048)) {
385
- // offset fits in 11 bits. The 3 highest go in the top of the first byte,
386
- // and the rest go in the second byte.
387
- *op++ = COPY_1_BYTE_OFFSET + ((len - 4) << 2) + ((offset >> 3) & 0xe0);
388
- *op++ = offset & 0xff;
661
+ if (len_less_than_12) {
662
+ uint32_t u = (len << 2) + (offset << 8);
663
+ uint32_t copy1 = COPY_1_BYTE_OFFSET - (4 << 2) + ((offset >> 3) & 0xe0);
664
+ uint32_t copy2 = COPY_2_BYTE_OFFSET - (1 << 2);
665
+ // It turns out that offset < 2048 is a difficult to predict branch.
666
+ // `perf record` shows this is the highest percentage of branch misses in
667
+ // benchmarks. This code produces branch free code, the data dependency
668
+ // chain that bottlenecks the throughput is so long that a few extra
669
+ // instructions are completely free (IPC << 6 because of data deps).
670
+ u += offset < 2048 ? copy1 : copy2;
671
+ LittleEndian::Store32(op, u);
672
+ op += offset < 2048 ? 2 : 3;
389
673
  } else {
390
674
  // Write 4 bytes, though we only care about 3 of them. The output buffer
391
675
  // is required to have some slack, so the extra byte won't overrun it.
392
- uint32 u = COPY_2_BYTE_OFFSET + ((len - 1) << 2) + (offset << 8);
676
+ uint32_t u = COPY_2_BYTE_OFFSET + ((len - 1) << 2) + (offset << 8);
393
677
  LittleEndian::Store32(op, u);
394
678
  op += 3;
395
679
  }
@@ -428,7 +712,7 @@ static inline char* EmitCopy(char* op, size_t offset, size_t len) {
428
712
  }
429
713
 
430
714
  bool GetUncompressedLength(const char* start, size_t n, size_t* result) {
431
- uint32 v = 0;
715
+ uint32_t v = 0;
432
716
  const char* limit = start + n;
433
717
  if (Varint::Parse32WithLimit(start, limit, &v) != NULL) {
434
718
  *result = v;
@@ -439,7 +723,7 @@ bool GetUncompressedLength(const char* start, size_t n, size_t* result) {
439
723
  }
440
724
 
441
725
  namespace {
442
- uint32 CalculateTableSize(uint32 input_size) {
726
+ uint32_t CalculateTableSize(uint32_t input_size) {
443
727
  static_assert(
444
728
  kMaxHashTableSize >= kMinHashTableSize,
445
729
  "kMaxHashTableSize should be greater or equal to kMinHashTableSize.");
@@ -462,7 +746,7 @@ WorkingMemory::WorkingMemory(size_t input_size) {
462
746
  size_ = table_size * sizeof(*table_) + max_fragment_size +
463
747
  MaxCompressedLength(max_fragment_size);
464
748
  mem_ = std::allocator<char>().allocate(size_);
465
- table_ = reinterpret_cast<uint16*>(mem_);
749
+ table_ = reinterpret_cast<uint16_t*>(mem_);
466
750
  input_ = mem_ + table_size * sizeof(*table_);
467
751
  output_ = input_ + max_fragment_size;
468
752
  }
@@ -471,8 +755,8 @@ WorkingMemory::~WorkingMemory() {
471
755
  std::allocator<char>().deallocate(mem_, size_);
472
756
  }
473
757
 
474
- uint16* WorkingMemory::GetHashTable(size_t fragment_size,
475
- int* table_size) const {
758
+ uint16_t* WorkingMemory::GetHashTable(size_t fragment_size,
759
+ int* table_size) const {
476
760
  const size_t htsize = CalculateTableSize(fragment_size);
477
761
  memset(table_, 0, htsize * sizeof(*table_));
478
762
  *table_size = htsize;
@@ -480,49 +764,6 @@ uint16* WorkingMemory::GetHashTable(size_t fragment_size,
480
764
  }
481
765
  } // end namespace internal
482
766
 
483
- // For 0 <= offset <= 4, GetUint32AtOffset(GetEightBytesAt(p), offset) will
484
- // equal UNALIGNED_LOAD32(p + offset). Motivation: On x86-64 hardware we have
485
- // empirically found that overlapping loads such as
486
- // UNALIGNED_LOAD32(p) ... UNALIGNED_LOAD32(p+1) ... UNALIGNED_LOAD32(p+2)
487
- // are slower than UNALIGNED_LOAD64(p) followed by shifts and casts to uint32.
488
- //
489
- // We have different versions for 64- and 32-bit; ideally we would avoid the
490
- // two functions and just inline the UNALIGNED_LOAD64 call into
491
- // GetUint32AtOffset, but GCC (at least not as of 4.6) is seemingly not clever
492
- // enough to avoid loading the value multiple times then. For 64-bit, the load
493
- // is done when GetEightBytesAt() is called, whereas for 32-bit, the load is
494
- // done at GetUint32AtOffset() time.
495
-
496
- #ifdef ARCH_K8
497
-
498
- typedef uint64 EightBytesReference;
499
-
500
- static inline EightBytesReference GetEightBytesAt(const char* ptr) {
501
- return UNALIGNED_LOAD64(ptr);
502
- }
503
-
504
- static inline uint32 GetUint32AtOffset(uint64 v, int offset) {
505
- assert(offset >= 0);
506
- assert(offset <= 4);
507
- return v >> (LittleEndian::IsLittleEndian() ? 8 * offset : 32 - 8 * offset);
508
- }
509
-
510
- #else
511
-
512
- typedef const char* EightBytesReference;
513
-
514
- static inline EightBytesReference GetEightBytesAt(const char* ptr) {
515
- return ptr;
516
- }
517
-
518
- static inline uint32 GetUint32AtOffset(const char* v, int offset) {
519
- assert(offset >= 0);
520
- assert(offset <= 4);
521
- return UNALIGNED_LOAD32(v + offset);
522
- }
523
-
524
- #endif
525
-
526
767
  // Flat array compression that does not emit the "uncompressed length"
527
768
  // prefix. Compresses "input" string to the "*op" buffer.
528
769
  //
@@ -535,29 +776,25 @@ static inline uint32 GetUint32AtOffset(const char* v, int offset) {
535
776
  // Returns an "end" pointer into "op" buffer.
536
777
  // "end - op" is the compressed size of "input".
537
778
  namespace internal {
538
- char* CompressFragment(const char* input,
539
- size_t input_size,
540
- char* op,
541
- uint16* table,
542
- const int table_size) {
779
+ char* CompressFragment(const char* input, size_t input_size, char* op,
780
+ uint16_t* table, const int table_size) {
543
781
  // "ip" is the input pointer, and "op" is the output pointer.
544
782
  const char* ip = input;
545
783
  assert(input_size <= kBlockSize);
546
784
  assert((table_size & (table_size - 1)) == 0); // table must be power of two
547
- const int shift = 32 - Bits::Log2Floor(table_size);
548
- assert(static_cast<int>(kuint32max >> shift) == table_size - 1);
785
+ const uint32_t mask = 2 * (table_size - 1);
549
786
  const char* ip_end = input + input_size;
550
787
  const char* base_ip = ip;
551
- // Bytes in [next_emit, ip) will be emitted as literal bytes. Or
552
- // [next_emit, ip_end) after the main loop.
553
- const char* next_emit = ip;
554
788
 
555
789
  const size_t kInputMarginBytes = 15;
556
790
  if (SNAPPY_PREDICT_TRUE(input_size >= kInputMarginBytes)) {
557
791
  const char* ip_limit = input + input_size - kInputMarginBytes;
558
792
 
559
- for (uint32 next_hash = Hash(++ip, shift); ; ) {
560
- assert(next_emit < ip);
793
+ for (uint32_t preload = LittleEndian::Load32(ip + 1);;) {
794
+ // Bytes in [next_emit, ip) will be emitted as literal bytes. Or
795
+ // [next_emit, ip_end) after the main loop.
796
+ const char* next_emit = ip++;
797
+ uint64_t data = LittleEndian::Load64(ip);
561
798
  // The body of this loop calls EmitLiteral once and then EmitCopy one or
562
799
  // more times. (The exception is that when we're close to exhausting
563
800
  // the input we goto emit_remainder.)
@@ -583,28 +820,60 @@ char* CompressFragment(const char* input,
583
820
  // The "skip" variable keeps track of how many bytes there are since the
584
821
  // last match; dividing it by 32 (ie. right-shifting by five) gives the
585
822
  // number of bytes to move ahead for each iteration.
586
- uint32 skip = 32;
823
+ uint32_t skip = 32;
587
824
 
588
- const char* next_ip = ip;
589
825
  const char* candidate;
590
- do {
591
- ip = next_ip;
592
- uint32 hash = next_hash;
593
- assert(hash == Hash(ip, shift));
594
- uint32 bytes_between_hash_lookups = skip >> 5;
826
+ if (ip_limit - ip >= 16) {
827
+ auto delta = ip - base_ip;
828
+ for (int j = 0; j < 4; ++j) {
829
+ for (int k = 0; k < 4; ++k) {
830
+ int i = 4 * j + k;
831
+ // These for-loops are meant to be unrolled. So we can freely
832
+ // special case the first iteration to use the value already
833
+ // loaded in preload.
834
+ uint32_t dword = i == 0 ? preload : static_cast<uint32_t>(data);
835
+ assert(dword == LittleEndian::Load32(ip + i));
836
+ uint16_t* table_entry = TableEntry(table, dword, mask);
837
+ candidate = base_ip + *table_entry;
838
+ assert(candidate >= base_ip);
839
+ assert(candidate < ip + i);
840
+ *table_entry = delta + i;
841
+ if (SNAPPY_PREDICT_FALSE(LittleEndian::Load32(candidate) == dword)) {
842
+ *op = LITERAL | (i << 2);
843
+ UnalignedCopy128(next_emit, op + 1);
844
+ ip += i;
845
+ op = op + i + 2;
846
+ goto emit_match;
847
+ }
848
+ data >>= 8;
849
+ }
850
+ data = LittleEndian::Load64(ip + 4 * j + 4);
851
+ }
852
+ ip += 16;
853
+ skip += 16;
854
+ }
855
+ while (true) {
856
+ assert(static_cast<uint32_t>(data) == LittleEndian::Load32(ip));
857
+ uint16_t* table_entry = TableEntry(table, data, mask);
858
+ uint32_t bytes_between_hash_lookups = skip >> 5;
595
859
  skip += bytes_between_hash_lookups;
596
- next_ip = ip + bytes_between_hash_lookups;
860
+ const char* next_ip = ip + bytes_between_hash_lookups;
597
861
  if (SNAPPY_PREDICT_FALSE(next_ip > ip_limit)) {
862
+ ip = next_emit;
598
863
  goto emit_remainder;
599
864
  }
600
- next_hash = Hash(next_ip, shift);
601
- candidate = base_ip + table[hash];
865
+ candidate = base_ip + *table_entry;
602
866
  assert(candidate >= base_ip);
603
867
  assert(candidate < ip);
604
868
 
605
- table[hash] = ip - base_ip;
606
- } while (SNAPPY_PREDICT_TRUE(UNALIGNED_LOAD32(ip) !=
607
- UNALIGNED_LOAD32(candidate)));
869
+ *table_entry = ip - base_ip;
870
+ if (SNAPPY_PREDICT_FALSE(static_cast<uint32_t>(data) ==
871
+ LittleEndian::Load32(candidate))) {
872
+ break;
873
+ }
874
+ data = LittleEndian::Load32(next_ip);
875
+ ip = next_ip;
876
+ }
608
877
 
609
878
  // Step 2: A 4-byte match has been found. We'll later see if more
610
879
  // than 4 bytes match. But, prior to the match, input
@@ -620,15 +889,13 @@ char* CompressFragment(const char* input,
620
889
  // though we don't yet know how big the literal will be. We handle that
621
890
  // by proceeding to the next iteration of the main loop. We also can exit
622
891
  // this loop via goto if we get close to exhausting the input.
623
- EightBytesReference input_bytes;
624
- uint32 candidate_bytes = 0;
625
-
892
+ emit_match:
626
893
  do {
627
894
  // We have a 4-byte match at ip, and no need to emit any
628
895
  // "literal bytes" prior to ip.
629
896
  const char* base = ip;
630
897
  std::pair<size_t, bool> p =
631
- FindMatchLength(candidate + 4, ip + 4, ip_end);
898
+ FindMatchLength(candidate + 4, ip + 4, ip_end, &data);
632
899
  size_t matched = 4 + p.first;
633
900
  ip += matched;
634
901
  size_t offset = base - candidate;
@@ -638,32 +905,41 @@ char* CompressFragment(const char* input,
638
905
  } else {
639
906
  op = EmitCopy</*len_less_than_12=*/false>(op, offset, matched);
640
907
  }
641
- next_emit = ip;
642
908
  if (SNAPPY_PREDICT_FALSE(ip >= ip_limit)) {
643
909
  goto emit_remainder;
644
910
  }
911
+ // Expect 5 bytes to match
912
+ assert((data & 0xFFFFFFFFFF) ==
913
+ (LittleEndian::Load64(ip) & 0xFFFFFFFFFF));
645
914
  // We are now looking for a 4-byte match again. We read
646
- // table[Hash(ip, shift)] for that. To improve compression,
647
- // we also update table[Hash(ip - 1, shift)] and table[Hash(ip, shift)].
648
- input_bytes = GetEightBytesAt(ip - 1);
649
- uint32 prev_hash = HashBytes(GetUint32AtOffset(input_bytes, 0), shift);
650
- table[prev_hash] = ip - base_ip - 1;
651
- uint32 cur_hash = HashBytes(GetUint32AtOffset(input_bytes, 1), shift);
652
- candidate = base_ip + table[cur_hash];
653
- candidate_bytes = UNALIGNED_LOAD32(candidate);
654
- table[cur_hash] = ip - base_ip;
655
- } while (GetUint32AtOffset(input_bytes, 1) == candidate_bytes);
656
-
657
- next_hash = HashBytes(GetUint32AtOffset(input_bytes, 2), shift);
658
- ++ip;
915
+ // table[Hash(ip, mask)] for that. To improve compression,
916
+ // we also update table[Hash(ip - 1, mask)] and table[Hash(ip, mask)].
917
+ *TableEntry(table, LittleEndian::Load32(ip - 1), mask) =
918
+ ip - base_ip - 1;
919
+ uint16_t* table_entry = TableEntry(table, data, mask);
920
+ candidate = base_ip + *table_entry;
921
+ *table_entry = ip - base_ip;
922
+ // Measurements on the benchmarks have shown the following probabilities
923
+ // for the loop to exit (ie. avg. number of iterations is reciprocal).
924
+ // BM_Flat/6 txt1 p = 0.3-0.4
925
+ // BM_Flat/7 txt2 p = 0.35
926
+ // BM_Flat/8 txt3 p = 0.3-0.4
927
+ // BM_Flat/9 txt3 p = 0.34-0.4
928
+ // BM_Flat/10 pb p = 0.4
929
+ // BM_Flat/11 gaviota p = 0.1
930
+ // BM_Flat/12 cp p = 0.5
931
+ // BM_Flat/13 c p = 0.3
932
+ } while (static_cast<uint32_t>(data) == LittleEndian::Load32(candidate));
933
+ // Because the least significant 5 bytes matched, we can utilize data
934
+ // for the next iteration.
935
+ preload = data >> 8;
659
936
  }
660
937
  }
661
938
 
662
- emit_remainder:
939
+ emit_remainder:
663
940
  // Emit the remaining bytes as a literal
664
- if (next_emit < ip_end) {
665
- op = EmitLiteral</*allow_fast_path=*/false>(op, next_emit,
666
- ip_end - next_emit);
941
+ if (ip < ip_end) {
942
+ op = EmitLiteral</*allow_fast_path=*/false>(op, ip, ip_end - ip);
667
943
  }
668
944
 
669
945
  return op;
@@ -672,7 +948,12 @@ char* CompressFragment(const char* input,
672
948
 
673
949
  // Called back at avery compression call to trace parameters and sizes.
674
950
  static inline void Report(const char *algorithm, size_t compressed_size,
675
- size_t uncompressed_size) {}
951
+ size_t uncompressed_size) {
952
+ // TODO: Switch to [[maybe_unused]] when we can assume C++17.
953
+ (void)algorithm;
954
+ (void)compressed_size;
955
+ (void)uncompressed_size;
956
+ }
676
957
 
677
958
  // Signature of output types needed by decompression code.
678
959
  // The decompression code is templatized on a type that obeys this
@@ -684,12 +965,28 @@ static inline void Report(const char *algorithm, size_t compressed_size,
684
965
  // // Called before decompression
685
966
  // void SetExpectedLength(size_t length);
686
967
  //
968
+ // // For performance a writer may choose to donate the cursor variable to the
969
+ // // decompression function. The decompression will inject it in all its
970
+ // // function calls to the writer. Keeping the important output cursor as a
971
+ // // function local stack variable allows the compiler to keep it in
972
+ // // register, which greatly aids performance by avoiding loads and stores of
973
+ // // this variable in the fast path loop iterations.
974
+ // T GetOutputPtr() const;
975
+ //
976
+ // // At end of decompression the loop donates the ownership of the cursor
977
+ // // variable back to the writer by calling this function.
978
+ // void SetOutputPtr(T op);
979
+ //
687
980
  // // Called after decompression
688
981
  // bool CheckLength() const;
689
982
  //
690
983
  // // Called repeatedly during decompression
691
- // bool Append(const char* ip, size_t length);
692
- // bool AppendFromSelf(uint32 offset, size_t length);
984
+ // // Each function get a pointer to the op (output pointer), that the writer
985
+ // // can use and update. Note it's important that these functions get fully
986
+ // // inlined so that no actual address of the local variable needs to be
987
+ // // taken.
988
+ // bool Append(const char* ip, size_t length, T* op);
989
+ // bool AppendFromSelf(uint32_t offset, size_t length, T* op);
693
990
  //
694
991
  // // The rules for how TryFastAppend differs from Append are somewhat
695
992
  // // convoluted:
@@ -711,25 +1008,25 @@ static inline void Report(const char *algorithm, size_t compressed_size,
711
1008
  // // as it is unlikely that one would implement a fast path accepting
712
1009
  // // this much data.
713
1010
  // //
714
- // bool TryFastAppend(const char* ip, size_t available, size_t length);
1011
+ // bool TryFastAppend(const char* ip, size_t available, size_t length, T* op);
715
1012
  // };
716
1013
 
717
- static inline uint32 ExtractLowBytes(uint32 v, int n) {
1014
+ static inline uint32_t ExtractLowBytes(const uint32_t& v, int n) {
718
1015
  assert(n >= 0);
719
1016
  assert(n <= 4);
720
1017
  #if SNAPPY_HAVE_BMI2
721
1018
  return _bzhi_u32(v, 8 * n);
722
1019
  #else
723
- // This needs to be wider than uint32 otherwise `mask << 32` will be
1020
+ // This needs to be wider than uint32_t otherwise `mask << 32` will be
724
1021
  // undefined.
725
- uint64 mask = 0xffffffff;
1022
+ uint64_t mask = 0xffffffff;
726
1023
  return v & ~(mask << (8 * n));
727
1024
  #endif
728
1025
  }
729
1026
 
730
- static inline bool LeftShiftOverflows(uint8 value, uint32 shift) {
1027
+ static inline bool LeftShiftOverflows(uint8_t value, uint32_t shift) {
731
1028
  assert(shift < 32);
732
- static const uint8 masks[] = {
1029
+ static const uint8_t masks[] = {
733
1030
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
734
1031
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
735
1032
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //
@@ -737,15 +1034,289 @@ static inline bool LeftShiftOverflows(uint8 value, uint32 shift) {
737
1034
  return (value & masks[shift]) != 0;
738
1035
  }
739
1036
 
1037
+ inline bool Copy64BytesWithPatternExtension(ptrdiff_t dst, size_t offset) {
1038
+ // TODO: Switch to [[maybe_unused]] when we can assume C++17.
1039
+ (void)dst;
1040
+ return offset != 0;
1041
+ }
1042
+
1043
+ // Copies between size bytes and 64 bytes from src to dest. size cannot exceed
1044
+ // 64. More than size bytes, but never exceeding 64, might be copied if doing
1045
+ // so gives better performance. [src, src + size) must not overlap with
1046
+ // [dst, dst + size), but [src, src + 64) may overlap with [dst, dst + 64).
1047
+ void MemCopy64(char* dst, const void* src, size_t size) {
1048
+ // Always copy this many bytes. If that's below size then copy the full 64.
1049
+ constexpr int kShortMemCopy = 32;
1050
+
1051
+ assert(size <= 64);
1052
+ assert(std::less_equal<const void*>()(static_cast<const char*>(src) + size,
1053
+ dst) ||
1054
+ std::less_equal<const void*>()(dst + size, src));
1055
+
1056
+ // We know that src and dst are at least size bytes apart. However, because we
1057
+ // might copy more than size bytes the copy still might overlap past size.
1058
+ // E.g. if src and dst appear consecutively in memory (src + size >= dst).
1059
+ // TODO: Investigate wider copies on other platforms.
1060
+ #if defined(__x86_64__) && defined(__AVX__)
1061
+ assert(kShortMemCopy <= 32);
1062
+ __m256i data = _mm256_lddqu_si256(static_cast<const __m256i *>(src));
1063
+ _mm256_storeu_si256(reinterpret_cast<__m256i *>(dst), data);
1064
+ // Profiling shows that nearly all copies are short.
1065
+ if (SNAPPY_PREDICT_FALSE(size > kShortMemCopy)) {
1066
+ data = _mm256_lddqu_si256(static_cast<const __m256i *>(src) + 1);
1067
+ _mm256_storeu_si256(reinterpret_cast<__m256i *>(dst) + 1, data);
1068
+ }
1069
+ #else
1070
+ std::memmove(dst, src, kShortMemCopy);
1071
+ // Profiling shows that nearly all copies are short.
1072
+ if (SNAPPY_PREDICT_FALSE(size > kShortMemCopy)) {
1073
+ std::memmove(dst + kShortMemCopy,
1074
+ static_cast<const uint8_t*>(src) + kShortMemCopy,
1075
+ 64 - kShortMemCopy);
1076
+ }
1077
+ #endif
1078
+ }
1079
+
1080
+ void MemCopy64(ptrdiff_t dst, const void* src, size_t size) {
1081
+ // TODO: Switch to [[maybe_unused]] when we can assume C++17.
1082
+ (void)dst;
1083
+ (void)src;
1084
+ (void)size;
1085
+ }
1086
+
1087
+ void ClearDeferred(const void** deferred_src, size_t* deferred_length,
1088
+ uint8_t* safe_source) {
1089
+ *deferred_src = safe_source;
1090
+ *deferred_length = 0;
1091
+ }
1092
+
1093
+ void DeferMemCopy(const void** deferred_src, size_t* deferred_length,
1094
+ const void* src, size_t length) {
1095
+ *deferred_src = src;
1096
+ *deferred_length = length;
1097
+ }
1098
+
1099
+ SNAPPY_ATTRIBUTE_ALWAYS_INLINE
1100
+ inline size_t AdvanceToNextTagARMOptimized(const uint8_t** ip_p, size_t* tag) {
1101
+ const uint8_t*& ip = *ip_p;
1102
+ // This section is crucial for the throughput of the decompression loop.
1103
+ // The latency of an iteration is fundamentally constrained by the
1104
+ // following data chain on ip.
1105
+ // ip -> c = Load(ip) -> delta1 = (c & 3) -> ip += delta1 or delta2
1106
+ // delta2 = ((c >> 2) + 1) ip++
1107
+ // This is different from X86 optimizations because ARM has conditional add
1108
+ // instruction (csinc) and it removes several register moves.
1109
+ const size_t tag_type = *tag & 3;
1110
+ const bool is_literal = (tag_type == 0);
1111
+ if (is_literal) {
1112
+ size_t next_literal_tag = (*tag >> 2) + 1;
1113
+ *tag = ip[next_literal_tag];
1114
+ ip += next_literal_tag + 1;
1115
+ } else {
1116
+ *tag = ip[tag_type];
1117
+ ip += tag_type + 1;
1118
+ }
1119
+ return tag_type;
1120
+ }
1121
+
1122
+ SNAPPY_ATTRIBUTE_ALWAYS_INLINE
1123
+ inline size_t AdvanceToNextTagX86Optimized(const uint8_t** ip_p, size_t* tag) {
1124
+ const uint8_t*& ip = *ip_p;
1125
+ // This section is crucial for the throughput of the decompression loop.
1126
+ // The latency of an iteration is fundamentally constrained by the
1127
+ // following data chain on ip.
1128
+ // ip -> c = Load(ip) -> ip1 = ip + 1 + (c & 3) -> ip = ip1 or ip2
1129
+ // ip2 = ip + 2 + (c >> 2)
1130
+ // This amounts to 8 cycles.
1131
+ // 5 (load) + 1 (c & 3) + 1 (lea ip1, [ip + (c & 3) + 1]) + 1 (cmov)
1132
+ size_t literal_len = *tag >> 2;
1133
+ size_t tag_type = *tag;
1134
+ bool is_literal;
1135
+ #if defined(__GCC_ASM_FLAG_OUTPUTS__) && defined(__x86_64__)
1136
+ // TODO clang misses the fact that the (c & 3) already correctly
1137
+ // sets the zero flag.
1138
+ asm("and $3, %k[tag_type]\n\t"
1139
+ : [tag_type] "+r"(tag_type), "=@ccz"(is_literal)
1140
+ :: "cc");
1141
+ #else
1142
+ tag_type &= 3;
1143
+ is_literal = (tag_type == 0);
1144
+ #endif
1145
+ // TODO
1146
+ // This is code is subtle. Loading the values first and then cmov has less
1147
+ // latency then cmov ip and then load. However clang would move the loads
1148
+ // in an optimization phase, volatile prevents this transformation.
1149
+ // Note that we have enough slop bytes (64) that the loads are always valid.
1150
+ size_t tag_literal =
1151
+ static_cast<const volatile uint8_t*>(ip)[1 + literal_len];
1152
+ size_t tag_copy = static_cast<const volatile uint8_t*>(ip)[tag_type];
1153
+ *tag = is_literal ? tag_literal : tag_copy;
1154
+ const uint8_t* ip_copy = ip + 1 + tag_type;
1155
+ const uint8_t* ip_literal = ip + 2 + literal_len;
1156
+ ip = is_literal ? ip_literal : ip_copy;
1157
+ #if defined(__GNUC__) && defined(__x86_64__)
1158
+ // TODO Clang is "optimizing" zero-extension (a totally free
1159
+ // operation) this means that after the cmov of tag, it emits another movzb
1160
+ // tag, byte(tag). It really matters as it's on the core chain. This dummy
1161
+ // asm, persuades clang to do the zero-extension at the load (it's automatic)
1162
+ // removing the expensive movzb.
1163
+ asm("" ::"r"(tag_copy));
1164
+ #endif
1165
+ return tag_type;
1166
+ }
1167
+
1168
+ // Extract the offset for copy-1 and copy-2 returns 0 for literals or copy-4.
1169
+ inline uint32_t ExtractOffset(uint32_t val, size_t tag_type) {
1170
+ // For x86 non-static storage works better. For ARM static storage is better.
1171
+ // TODO: Once the array is recognized as a register, improve the
1172
+ // readability for x86.
1173
+ #if defined(__x86_64__)
1174
+ constexpr uint64_t kExtractMasksCombined = 0x0000FFFF00FF0000ull;
1175
+ uint16_t result;
1176
+ memcpy(&result,
1177
+ reinterpret_cast<const char*>(&kExtractMasksCombined) + 2 * tag_type,
1178
+ sizeof(result));
1179
+ return val & result;
1180
+ #elif defined(__aarch64__)
1181
+ constexpr uint64_t kExtractMasksCombined = 0x0000FFFF00FF0000ull;
1182
+ return val & static_cast<uint32_t>(
1183
+ (kExtractMasksCombined >> (tag_type * 16)) & 0xFFFF);
1184
+ #else
1185
+ static constexpr uint32_t kExtractMasks[4] = {0, 0xFF, 0xFFFF, 0};
1186
+ return val & kExtractMasks[tag_type];
1187
+ #endif
1188
+ };
1189
+
1190
+ // Core decompression loop, when there is enough data available.
1191
+ // Decompresses the input buffer [ip, ip_limit) into the output buffer
1192
+ // [op, op_limit_min_slop). Returning when either we are too close to the end
1193
+ // of the input buffer, or we exceed op_limit_min_slop or when a exceptional
1194
+ // tag is encountered (literal of length > 60) or a copy-4.
1195
+ // Returns {ip, op} at the points it stopped decoding.
1196
+ // TODO This function probably does not need to be inlined, as it
1197
+ // should decode large chunks at a time. This allows runtime dispatch to
1198
+ // implementations based on CPU capability (BMI2 / perhaps 32 / 64 byte memcpy).
1199
+ template <typename T>
1200
+ std::pair<const uint8_t*, ptrdiff_t> DecompressBranchless(
1201
+ const uint8_t* ip, const uint8_t* ip_limit, ptrdiff_t op, T op_base,
1202
+ ptrdiff_t op_limit_min_slop) {
1203
+ // If deferred_src is invalid point it here.
1204
+ uint8_t safe_source[64];
1205
+ const void* deferred_src;
1206
+ size_t deferred_length;
1207
+ ClearDeferred(&deferred_src, &deferred_length, safe_source);
1208
+
1209
+ // We unroll the inner loop twice so we need twice the spare room.
1210
+ op_limit_min_slop -= kSlopBytes;
1211
+ if (2 * (kSlopBytes + 1) < ip_limit - ip && op < op_limit_min_slop) {
1212
+ const uint8_t* const ip_limit_min_slop = ip_limit - 2 * kSlopBytes - 1;
1213
+ ip++;
1214
+ // ip points just past the tag and we are touching at maximum kSlopBytes
1215
+ // in an iteration.
1216
+ size_t tag = ip[-1];
1217
+ #if defined(__clang__) && defined(__aarch64__)
1218
+ // Workaround for https://bugs.llvm.org/show_bug.cgi?id=51317
1219
+ // when loading 1 byte, clang for aarch64 doesn't realize that it(ldrb)
1220
+ // comes with free zero-extension, so clang generates another
1221
+ // 'and xn, xm, 0xff' before it use that as the offset. This 'and' is
1222
+ // redundant and can be removed by adding this dummy asm, which gives
1223
+ // clang a hint that we're doing the zero-extension at the load.
1224
+ asm("" ::"r"(tag));
1225
+ #endif
1226
+ do {
1227
+ // The throughput is limited by instructions, unrolling the inner loop
1228
+ // twice reduces the amount of instructions checking limits and also
1229
+ // leads to reduced mov's.
1230
+
1231
+ SNAPPY_PREFETCH(ip + 128);
1232
+ for (int i = 0; i < 2; i++) {
1233
+ const uint8_t* old_ip = ip;
1234
+ assert(tag == ip[-1]);
1235
+ // For literals tag_type = 0, hence we will always obtain 0 from
1236
+ // ExtractLowBytes. For literals offset will thus be kLiteralOffset.
1237
+ ptrdiff_t len_min_offset = kLengthMinusOffset[tag];
1238
+ #if defined(__aarch64__)
1239
+ size_t tag_type = AdvanceToNextTagARMOptimized(&ip, &tag);
1240
+ #else
1241
+ size_t tag_type = AdvanceToNextTagX86Optimized(&ip, &tag);
1242
+ #endif
1243
+ uint32_t next = LittleEndian::Load32(old_ip);
1244
+ size_t len = len_min_offset & 0xFF;
1245
+ len_min_offset -= ExtractOffset(next, tag_type);
1246
+ if (SNAPPY_PREDICT_FALSE(len_min_offset > 0)) {
1247
+ if (SNAPPY_PREDICT_FALSE(len & 0x80)) {
1248
+ // Exceptional case (long literal or copy 4).
1249
+ // Actually doing the copy here is negatively impacting the main
1250
+ // loop due to compiler incorrectly allocating a register for
1251
+ // this fallback. Hence we just break.
1252
+ break_loop:
1253
+ ip = old_ip;
1254
+ goto exit;
1255
+ }
1256
+ // Only copy-1 or copy-2 tags can get here.
1257
+ assert(tag_type == 1 || tag_type == 2);
1258
+ std::ptrdiff_t delta = (op + deferred_length) + len_min_offset - len;
1259
+ // Guard against copies before the buffer start.
1260
+ // Execute any deferred MemCopy since we write to dst here.
1261
+ MemCopy64(op_base + op, deferred_src, deferred_length);
1262
+ op += deferred_length;
1263
+ ClearDeferred(&deferred_src, &deferred_length, safe_source);
1264
+ if (SNAPPY_PREDICT_FALSE(delta < 0 ||
1265
+ !Copy64BytesWithPatternExtension(
1266
+ op_base + op, len - len_min_offset))) {
1267
+ goto break_loop;
1268
+ }
1269
+ // We aren't deferring this copy so add length right away.
1270
+ op += len;
1271
+ continue;
1272
+ }
1273
+ std::ptrdiff_t delta = (op + deferred_length) + len_min_offset - len;
1274
+ if (SNAPPY_PREDICT_FALSE(delta < 0)) {
1275
+ // Due to the spurious offset in literals have this will trigger
1276
+ // at the start of a block when op is still smaller than 256.
1277
+ if (tag_type != 0) goto break_loop;
1278
+ MemCopy64(op_base + op, deferred_src, deferred_length);
1279
+ op += deferred_length;
1280
+ DeferMemCopy(&deferred_src, &deferred_length, old_ip, len);
1281
+ continue;
1282
+ }
1283
+
1284
+ // For copies we need to copy from op_base + delta, for literals
1285
+ // we need to copy from ip instead of from the stream.
1286
+ const void* from =
1287
+ tag_type ? reinterpret_cast<void*>(op_base + delta) : old_ip;
1288
+ MemCopy64(op_base + op, deferred_src, deferred_length);
1289
+ op += deferred_length;
1290
+ DeferMemCopy(&deferred_src, &deferred_length, from, len);
1291
+ }
1292
+ } while (ip < ip_limit_min_slop &&
1293
+ (op + deferred_length) < op_limit_min_slop);
1294
+ exit:
1295
+ ip--;
1296
+ assert(ip <= ip_limit);
1297
+ }
1298
+ // If we deferred a copy then we can perform. If we are up to date then we
1299
+ // might not have enough slop bytes and could run past the end.
1300
+ if (deferred_length) {
1301
+ MemCopy64(op_base + op, deferred_src, deferred_length);
1302
+ op += deferred_length;
1303
+ ClearDeferred(&deferred_src, &deferred_length, safe_source);
1304
+ }
1305
+ return {ip, op};
1306
+ }
1307
+
740
1308
  // Helper class for decompression
741
1309
  class SnappyDecompressor {
742
1310
  private:
743
- Source* reader_; // Underlying source of bytes to decompress
744
- const char* ip_; // Points to next buffered byte
745
- const char* ip_limit_; // Points just past buffered bytes
746
- uint32 peeked_; // Bytes peeked from reader (need to skip)
747
- bool eof_; // Hit end of input without an error?
748
- char scratch_[kMaximumTagLength]; // See RefillTag().
1311
+ Source* reader_; // Underlying source of bytes to decompress
1312
+ const char* ip_; // Points to next buffered byte
1313
+ const char* ip_limit_; // Points just past buffered bytes
1314
+ // If ip < ip_limit_min_maxtaglen_ it's safe to read kMaxTagLength from
1315
+ // buffer.
1316
+ const char* ip_limit_min_maxtaglen_;
1317
+ uint32_t peeked_; // Bytes peeked from reader (need to skip)
1318
+ bool eof_; // Hit end of input without an error?
1319
+ char scratch_[kMaximumTagLength]; // See RefillTag().
749
1320
 
750
1321
  // Ensure that all of the tag metadata for the next tag is available
751
1322
  // in [ip_..ip_limit_-1]. Also ensures that [ip,ip+4] is readable even
@@ -754,14 +1325,14 @@ class SnappyDecompressor {
754
1325
  // Returns true on success, false on error or end of input.
755
1326
  bool RefillTag();
756
1327
 
1328
+ void ResetLimit(const char* ip) {
1329
+ ip_limit_min_maxtaglen_ =
1330
+ ip_limit_ - std::min<ptrdiff_t>(ip_limit_ - ip, kMaximumTagLength - 1);
1331
+ }
1332
+
757
1333
  public:
758
1334
  explicit SnappyDecompressor(Source* reader)
759
- : reader_(reader),
760
- ip_(NULL),
761
- ip_limit_(NULL),
762
- peeked_(0),
763
- eof_(false) {
764
- }
1335
+ : reader_(reader), ip_(NULL), ip_limit_(NULL), peeked_(0), eof_(false) {}
765
1336
 
766
1337
  ~SnappyDecompressor() {
767
1338
  // Advance past any bytes we peeked at from the reader
@@ -769,18 +1340,16 @@ class SnappyDecompressor {
769
1340
  }
770
1341
 
771
1342
  // Returns true iff we have hit the end of the input without an error.
772
- bool eof() const {
773
- return eof_;
774
- }
1343
+ bool eof() const { return eof_; }
775
1344
 
776
1345
  // Read the uncompressed length stored at the start of the compressed data.
777
1346
  // On success, stores the length in *result and returns true.
778
1347
  // On failure, returns false.
779
- bool ReadUncompressedLength(uint32* result) {
780
- assert(ip_ == NULL); // Must not have read anything yet
1348
+ bool ReadUncompressedLength(uint32_t* result) {
1349
+ assert(ip_ == NULL); // Must not have read anything yet
781
1350
  // Length is encoded in 1..5 bytes
782
1351
  *result = 0;
783
- uint32 shift = 0;
1352
+ uint32_t shift = 0;
784
1353
  while (true) {
785
1354
  if (shift >= 32) return false;
786
1355
  size_t n;
@@ -788,8 +1357,8 @@ class SnappyDecompressor {
788
1357
  if (n == 0) return false;
789
1358
  const unsigned char c = *(reinterpret_cast<const unsigned char*>(ip));
790
1359
  reader_->Skip(1);
791
- uint32 val = c & 0x7f;
792
- if (LeftShiftOverflows(static_cast<uint8>(val), shift)) return false;
1360
+ uint32_t val = c & 0x7f;
1361
+ if (LeftShiftOverflows(static_cast<uint8_t>(val), shift)) return false;
793
1362
  *result |= val << shift;
794
1363
  if (c < 128) {
795
1364
  break;
@@ -805,38 +1374,44 @@ class SnappyDecompressor {
805
1374
  #if defined(__GNUC__) && defined(__x86_64__)
806
1375
  __attribute__((aligned(32)))
807
1376
  #endif
808
- void DecompressAllTags(Writer* writer) {
809
- // In x86, pad the function body to start 16 bytes later. This function has
810
- // a couple of hotspots that are highly sensitive to alignment: we have
811
- // observed regressions by more than 20% in some metrics just by moving the
812
- // exact same code to a different position in the benchmark binary.
813
- //
814
- // Putting this code on a 32-byte-aligned boundary + 16 bytes makes us hit
815
- // the "lucky" case consistently. Unfortunately, this is a very brittle
816
- // workaround, and future differences in code generation may reintroduce
817
- // this regression. If you experience a big, difficult to explain, benchmark
818
- // performance regression here, first try removing this hack.
819
- #if defined(__GNUC__) && defined(__x86_64__)
820
- // Two 8-byte "NOP DWORD ptr [EAX + EAX*1 + 00000000H]" instructions.
821
- asm(".byte 0x0f, 0x1f, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00");
822
- asm(".byte 0x0f, 0x1f, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00");
823
- #endif
824
-
1377
+ void
1378
+ DecompressAllTags(Writer* writer) {
825
1379
  const char* ip = ip_;
1380
+ ResetLimit(ip);
1381
+ auto op = writer->GetOutputPtr();
826
1382
  // We could have put this refill fragment only at the beginning of the loop.
827
1383
  // However, duplicating it at the end of each branch gives the compiler more
828
1384
  // scope to optimize the <ip_limit_ - ip> expression based on the local
829
1385
  // context, which overall increases speed.
830
- #define MAYBE_REFILL() \
831
- if (ip_limit_ - ip < kMaximumTagLength) { \
832
- ip_ = ip; \
833
- if (!RefillTag()) return; \
834
- ip = ip_; \
835
- }
836
-
1386
+ #define MAYBE_REFILL() \
1387
+ if (SNAPPY_PREDICT_FALSE(ip >= ip_limit_min_maxtaglen_)) { \
1388
+ ip_ = ip; \
1389
+ if (SNAPPY_PREDICT_FALSE(!RefillTag())) goto exit; \
1390
+ ip = ip_; \
1391
+ ResetLimit(ip); \
1392
+ } \
1393
+ preload = static_cast<uint8_t>(*ip)
1394
+
1395
+ // At the start of the for loop below the least significant byte of preload
1396
+ // contains the tag.
1397
+ uint32_t preload;
837
1398
  MAYBE_REFILL();
838
- for ( ;; ) {
839
- const unsigned char c = *(reinterpret_cast<const unsigned char*>(ip++));
1399
+ for (;;) {
1400
+ {
1401
+ ptrdiff_t op_limit_min_slop;
1402
+ auto op_base = writer->GetBase(&op_limit_min_slop);
1403
+ if (op_base) {
1404
+ auto res =
1405
+ DecompressBranchless(reinterpret_cast<const uint8_t*>(ip),
1406
+ reinterpret_cast<const uint8_t*>(ip_limit_),
1407
+ op - op_base, op_base, op_limit_min_slop);
1408
+ ip = reinterpret_cast<const char*>(res.first);
1409
+ op = op_base + res.second;
1410
+ MAYBE_REFILL();
1411
+ }
1412
+ }
1413
+ const uint8_t c = static_cast<uint8_t>(preload);
1414
+ ip++;
840
1415
 
841
1416
  // Ratio of iterations that have LITERAL vs non-LITERAL for different
842
1417
  // inputs.
@@ -852,12 +1427,13 @@ class SnappyDecompressor {
852
1427
  // bin 24% 76%
853
1428
  if (SNAPPY_PREDICT_FALSE((c & 0x3) == LITERAL)) {
854
1429
  size_t literal_length = (c >> 2) + 1u;
855
- if (writer->TryFastAppend(ip, ip_limit_ - ip, literal_length)) {
1430
+ if (writer->TryFastAppend(ip, ip_limit_ - ip, literal_length, &op)) {
856
1431
  assert(literal_length < 61);
857
1432
  ip += literal_length;
858
1433
  // NOTE: There is no MAYBE_REFILL() here, as TryFastAppend()
859
1434
  // will not return true unless there's already at least five spare
860
1435
  // bytes in addition to the literal.
1436
+ preload = static_cast<uint8_t>(*ip);
861
1437
  continue;
862
1438
  }
863
1439
  if (SNAPPY_PREDICT_FALSE(literal_length >= 61)) {
@@ -871,48 +1447,79 @@ class SnappyDecompressor {
871
1447
 
872
1448
  size_t avail = ip_limit_ - ip;
873
1449
  while (avail < literal_length) {
874
- if (!writer->Append(ip, avail)) return;
1450
+ if (!writer->Append(ip, avail, &op)) goto exit;
875
1451
  literal_length -= avail;
876
1452
  reader_->Skip(peeked_);
877
1453
  size_t n;
878
1454
  ip = reader_->Peek(&n);
879
1455
  avail = n;
880
1456
  peeked_ = avail;
881
- if (avail == 0) return; // Premature end of input
1457
+ if (avail == 0) goto exit;
882
1458
  ip_limit_ = ip + avail;
1459
+ ResetLimit(ip);
883
1460
  }
884
- if (!writer->Append(ip, literal_length)) {
885
- return;
886
- }
1461
+ if (!writer->Append(ip, literal_length, &op)) goto exit;
887
1462
  ip += literal_length;
888
1463
  MAYBE_REFILL();
889
1464
  } else {
890
- const size_t entry = char_table[c];
891
- const size_t trailer =
892
- ExtractLowBytes(LittleEndian::Load32(ip), entry >> 11);
893
- const size_t length = entry & 0xff;
894
- ip += entry >> 11;
895
-
896
- // copy_offset/256 is encoded in bits 8..10. By just fetching
897
- // those bits, we get copy_offset (since the bit-field starts at
898
- // bit 8).
899
- const size_t copy_offset = entry & 0x700;
900
- if (!writer->AppendFromSelf(copy_offset + trailer, length)) {
901
- return;
1465
+ if (SNAPPY_PREDICT_FALSE((c & 3) == COPY_4_BYTE_OFFSET)) {
1466
+ const size_t copy_offset = LittleEndian::Load32(ip);
1467
+ const size_t length = (c >> 2) + 1;
1468
+ ip += 4;
1469
+
1470
+ if (!writer->AppendFromSelf(copy_offset, length, &op)) goto exit;
1471
+ } else {
1472
+ const ptrdiff_t entry = kLengthMinusOffset[c];
1473
+ preload = LittleEndian::Load32(ip);
1474
+ const uint32_t trailer = ExtractLowBytes(preload, c & 3);
1475
+ const uint32_t length = entry & 0xff;
1476
+ assert(length > 0);
1477
+
1478
+ // copy_offset/256 is encoded in bits 8..10. By just fetching
1479
+ // those bits, we get copy_offset (since the bit-field starts at
1480
+ // bit 8).
1481
+ const uint32_t copy_offset = trailer - entry + length;
1482
+ if (!writer->AppendFromSelf(copy_offset, length, &op)) goto exit;
1483
+
1484
+ ip += (c & 3);
1485
+ // By using the result of the previous load we reduce the critical
1486
+ // dependency chain of ip to 4 cycles.
1487
+ preload >>= (c & 3) * 8;
1488
+ if (ip < ip_limit_min_maxtaglen_) continue;
902
1489
  }
903
1490
  MAYBE_REFILL();
904
1491
  }
905
1492
  }
906
-
907
1493
  #undef MAYBE_REFILL
1494
+ exit:
1495
+ writer->SetOutputPtr(op);
908
1496
  }
909
1497
  };
910
1498
 
1499
+ constexpr uint32_t CalculateNeeded(uint8_t tag) {
1500
+ return ((tag & 3) == 0 && tag >= (60 * 4))
1501
+ ? (tag >> 2) - 58
1502
+ : (0x05030201 >> ((tag * 8) & 31)) & 0xFF;
1503
+ }
1504
+
1505
+ #if __cplusplus >= 201402L
1506
+ constexpr bool VerifyCalculateNeeded() {
1507
+ for (int i = 0; i < 1; i++) {
1508
+ if (CalculateNeeded(i) != (char_table[i] >> 11) + 1) return false;
1509
+ }
1510
+ return true;
1511
+ }
1512
+
1513
+ // Make sure CalculateNeeded is correct by verifying it against the established
1514
+ // table encoding the number of added bytes needed.
1515
+ static_assert(VerifyCalculateNeeded(), "");
1516
+ #endif // c++14
1517
+
911
1518
  bool SnappyDecompressor::RefillTag() {
912
1519
  const char* ip = ip_;
913
1520
  if (ip == ip_limit_) {
914
1521
  // Fetch a new fragment from the reader
915
- reader_->Skip(peeked_); // All peeked bytes are used up
1522
+ reader_->Skip(peeked_); // All peeked bytes are used up
916
1523
  size_t n;
917
1524
  ip = reader_->Peek(&n);
918
1525
  peeked_ = n;
@@ -924,26 +1531,31 @@ bool SnappyDecompressor::RefillTag() {
924
1531
  // Read the tag character
925
1532
  assert(ip < ip_limit_);
926
1533
  const unsigned char c = *(reinterpret_cast<const unsigned char*>(ip));
927
- const uint32 entry = char_table[c];
928
- const uint32 needed = (entry >> 11) + 1; // +1 byte for 'c'
1534
+ // At this point make sure that the data for the next tag is consecutive.
1535
+ // For copy 1 this means the next 2 bytes (tag and 1 byte offset)
1536
+ // For copy 2 the next 3 bytes (tag and 2 byte offset)
1537
+ // For copy 4 the next 5 bytes (tag and 4 byte offset)
1538
+ // For all small literals we only need 1 byte buf for literals 60...63 the
1539
+ // length is encoded in 1...4 extra bytes.
1540
+ const uint32_t needed = CalculateNeeded(c);
929
1541
  assert(needed <= sizeof(scratch_));
930
1542
 
931
1543
  // Read more bytes from reader if needed
932
- uint32 nbuf = ip_limit_ - ip;
1544
+ uint32_t nbuf = ip_limit_ - ip;
933
1545
  if (nbuf < needed) {
934
1546
  // Stitch together bytes from ip and reader to form the word
935
1547
  // contents. We store the needed bytes in "scratch_". They
936
1548
  // will be consumed immediately by the caller since we do not
937
1549
  // read more than we need.
938
- memmove(scratch_, ip, nbuf);
1550
+ std::memmove(scratch_, ip, nbuf);
939
1551
  reader_->Skip(peeked_); // All peeked bytes are used up
940
1552
  peeked_ = 0;
941
1553
  while (nbuf < needed) {
942
1554
  size_t length;
943
1555
  const char* src = reader_->Peek(&length);
944
1556
  if (length == 0) return false;
945
- uint32 to_add = std::min<uint32>(needed - nbuf, length);
946
- memcpy(scratch_ + nbuf, src, to_add);
1557
+ uint32_t to_add = std::min<uint32_t>(needed - nbuf, length);
1558
+ std::memcpy(scratch_ + nbuf, src, to_add);
947
1559
  nbuf += to_add;
948
1560
  reader_->Skip(to_add);
949
1561
  }
@@ -953,7 +1565,7 @@ bool SnappyDecompressor::RefillTag() {
953
1565
  } else if (nbuf < kMaximumTagLength) {
954
1566
  // Have enough bytes, but move into scratch_ so that we do not
955
1567
  // read past end of input
956
- memmove(scratch_, ip, nbuf);
1568
+ std::memmove(scratch_, ip, nbuf);
957
1569
  reader_->Skip(peeked_); // All peeked bytes are used up
958
1570
  peeked_ = 0;
959
1571
  ip_ = scratch_;
@@ -969,7 +1581,7 @@ template <typename Writer>
969
1581
  static bool InternalUncompress(Source* r, Writer* writer) {
970
1582
  // Read the uncompressed length from the front of the compressed input
971
1583
  SnappyDecompressor decompressor(r);
972
- uint32 uncompressed_len = 0;
1584
+ uint32_t uncompressed_len = 0;
973
1585
  if (!decompressor.ReadUncompressedLength(&uncompressed_len)) return false;
974
1586
 
975
1587
  return InternalUncompressAllTags(&decompressor, writer, r->Available(),
@@ -978,9 +1590,8 @@ static bool InternalUncompress(Source* r, Writer* writer) {
978
1590
 
979
1591
  template <typename Writer>
980
1592
  static bool InternalUncompressAllTags(SnappyDecompressor* decompressor,
981
- Writer* writer,
982
- uint32 compressed_len,
983
- uint32 uncompressed_len) {
1593
+ Writer* writer, uint32_t compressed_len,
1594
+ uint32_t uncompressed_len) {
984
1595
  Report("snappy_uncompress", compressed_len, uncompressed_len);
985
1596
 
986
1597
  writer->SetExpectedLength(uncompressed_len);
@@ -991,7 +1602,7 @@ static bool InternalUncompressAllTags(SnappyDecompressor* decompressor,
991
1602
  return (decompressor->eof() && writer->CheckLength());
992
1603
  }
993
1604
 
994
- bool GetUncompressedLength(Source* source, uint32* result) {
1605
+ bool GetUncompressedLength(Source* source, uint32_t* result) {
995
1606
  SnappyDecompressor decompressor(source);
996
1607
  return decompressor.ReadUncompressedLength(result);
997
1608
  }
@@ -1002,7 +1613,7 @@ size_t Compress(Source* reader, Sink* writer) {
1002
1613
  const size_t uncompressed_size = N;
1003
1614
  char ulength[Varint::kMax32];
1004
1615
  char* p = Varint::Encode32(ulength, N);
1005
- writer->Append(ulength, p-ulength);
1616
+ writer->Append(ulength, p - ulength);
1006
1617
  written += (p - ulength);
1007
1618
 
1008
1619
  internal::WorkingMemory wmem(N);
@@ -1022,13 +1633,13 @@ size_t Compress(Source* reader, Sink* writer) {
1022
1633
  fragment_size = num_to_read;
1023
1634
  } else {
1024
1635
  char* scratch = wmem.GetScratchInput();
1025
- memcpy(scratch, fragment, bytes_read);
1636
+ std::memcpy(scratch, fragment, bytes_read);
1026
1637
  reader->Skip(bytes_read);
1027
1638
 
1028
1639
  while (bytes_read < num_to_read) {
1029
1640
  fragment = reader->Peek(&fragment_size);
1030
1641
  size_t n = std::min<size_t>(fragment_size, num_to_read - bytes_read);
1031
- memcpy(scratch + bytes_read, fragment, n);
1642
+ std::memcpy(scratch + bytes_read, fragment, n);
1032
1643
  bytes_read += n;
1033
1644
  reader->Skip(n);
1034
1645
  }
@@ -1040,7 +1651,7 @@ size_t Compress(Source* reader, Sink* writer) {
1040
1651
 
1041
1652
  // Get encoding table for compression
1042
1653
  int table_size;
1043
- uint16* table = wmem.GetHashTable(num_to_read, &table_size);
1654
+ uint16_t* table = wmem.GetHashTable(num_to_read, &table_size);
1044
1655
 
1045
1656
  // Compress input_fragment and append to dest
1046
1657
  const int max_output = MaxCompressedLength(num_to_read);
@@ -1070,6 +1681,67 @@ size_t Compress(Source* reader, Sink* writer) {
1070
1681
  // IOVec interfaces
1071
1682
  // -----------------------------------------------------------------------
1072
1683
 
1684
+ // A `Source` implementation that yields the contents of an `iovec` array. Note
1685
+ // that `total_size` is the total number of bytes to be read from the elements
1686
+ // of `iov` (_not_ the total number of elements in `iov`).
1687
+ class SnappyIOVecReader : public Source {
1688
+ public:
1689
+ SnappyIOVecReader(const struct iovec* iov, size_t total_size)
1690
+ : curr_iov_(iov),
1691
+ curr_pos_(total_size > 0 ? reinterpret_cast<const char*>(iov->iov_base)
1692
+ : nullptr),
1693
+ curr_size_remaining_(total_size > 0 ? iov->iov_len : 0),
1694
+ total_size_remaining_(total_size) {
1695
+ // Skip empty leading `iovec`s.
1696
+ if (total_size > 0 && curr_size_remaining_ == 0) Advance();
1697
+ }
1698
+
1699
+ ~SnappyIOVecReader() = default;
1700
+
1701
+ size_t Available() const { return total_size_remaining_; }
1702
+
1703
+ const char* Peek(size_t* len) {
1704
+ *len = curr_size_remaining_;
1705
+ return curr_pos_;
1706
+ }
1707
+
1708
+ void Skip(size_t n) {
1709
+ while (n >= curr_size_remaining_ && n > 0) {
1710
+ n -= curr_size_remaining_;
1711
+ Advance();
1712
+ }
1713
+ curr_size_remaining_ -= n;
1714
+ total_size_remaining_ -= n;
1715
+ curr_pos_ += n;
1716
+ }
1717
+
1718
+ private:
1719
+ // Advances to the next nonempty `iovec` and updates related variables.
1720
+ void Advance() {
1721
+ do {
1722
+ assert(total_size_remaining_ >= curr_size_remaining_);
1723
+ total_size_remaining_ -= curr_size_remaining_;
1724
+ if (total_size_remaining_ == 0) {
1725
+ curr_pos_ = nullptr;
1726
+ curr_size_remaining_ = 0;
1727
+ return;
1728
+ }
1729
+ ++curr_iov_;
1730
+ curr_pos_ = reinterpret_cast<const char*>(curr_iov_->iov_base);
1731
+ curr_size_remaining_ = curr_iov_->iov_len;
1732
+ } while (curr_size_remaining_ == 0);
1733
+ }
1734
+
1735
+ // The `iovec` currently being read.
1736
+ const struct iovec* curr_iov_;
1737
+ // The location in `curr_iov_` currently being read.
1738
+ const char* curr_pos_;
1739
+ // The amount of unread data in `curr_iov_`.
1740
+ size_t curr_size_remaining_;
1741
+ // The amount of unread data in the entire input array.
1742
+ size_t total_size_remaining_;
1743
+ };
1744
+
1073
1745
  // A type that writes to an iovec.
1074
1746
  // Note that this is not a "ByteSink", but a type that matches the
1075
1747
  // Writer template argument to SnappyDecompressor::DecompressAllTags().
@@ -1115,17 +1787,14 @@ class SnappyIOVecWriter {
1115
1787
  : nullptr),
1116
1788
  curr_iov_remaining_(iov_count ? iov->iov_len : 0),
1117
1789
  total_written_(0),
1118
- output_limit_(-1) {}
1119
-
1120
- inline void SetExpectedLength(size_t len) {
1121
- output_limit_ = len;
1790
+ output_limit_(-1) {
1122
1791
  }
1123
1792
 
1124
- inline bool CheckLength() const {
1125
- return total_written_ == output_limit_;
1126
- }
1793
+ inline void SetExpectedLength(size_t len) { output_limit_ = len; }
1127
1794
 
1128
- inline bool Append(const char* ip, size_t len) {
1795
+ inline bool CheckLength() const { return total_written_ == output_limit_; }
1796
+
1797
+ inline bool Append(const char* ip, size_t len, char**) {
1129
1798
  if (total_written_ + len > output_limit_) {
1130
1799
  return false;
1131
1800
  }
@@ -1133,6 +1802,13 @@ class SnappyIOVecWriter {
1133
1802
  return AppendNoCheck(ip, len);
1134
1803
  }
1135
1804
 
1805
+ char* GetOutputPtr() { return nullptr; }
1806
+ char* GetBase(ptrdiff_t*) { return nullptr; }
1807
+ void SetOutputPtr(char* op) {
1808
+ // TODO: Switch to [[maybe_unused]] when we can assume C++17.
1809
+ (void)op;
1810
+ }
1811
+
1136
1812
  inline bool AppendNoCheck(const char* ip, size_t len) {
1137
1813
  while (len > 0) {
1138
1814
  if (curr_iov_remaining_ == 0) {
@@ -1146,7 +1822,7 @@ class SnappyIOVecWriter {
1146
1822
  }
1147
1823
 
1148
1824
  const size_t to_write = std::min(len, curr_iov_remaining_);
1149
- memcpy(curr_iov_output_, ip, to_write);
1825
+ std::memcpy(curr_iov_output_, ip, to_write);
1150
1826
  curr_iov_output_ += to_write;
1151
1827
  curr_iov_remaining_ -= to_write;
1152
1828
  total_written_ += to_write;
@@ -1157,7 +1833,8 @@ class SnappyIOVecWriter {
1157
1833
  return true;
1158
1834
  }
1159
1835
 
1160
- inline bool TryFastAppend(const char* ip, size_t available, size_t len) {
1836
+ inline bool TryFastAppend(const char* ip, size_t available, size_t len,
1837
+ char**) {
1161
1838
  const size_t space_left = output_limit_ - total_written_;
1162
1839
  if (len <= 16 && available >= 16 + kMaximumTagLength && space_left >= 16 &&
1163
1840
  curr_iov_remaining_ >= 16) {
@@ -1172,7 +1849,7 @@ class SnappyIOVecWriter {
1172
1849
  return false;
1173
1850
  }
1174
1851
 
1175
- inline bool AppendFromSelf(size_t offset, size_t len) {
1852
+ inline bool AppendFromSelf(size_t offset, size_t len, char**) {
1176
1853
  // See SnappyArrayWriter::AppendFromSelf for an explanation of
1177
1854
  // the "offset - 1u" trick.
1178
1855
  if (offset - 1u >= total_written_) {
@@ -1228,6 +1905,7 @@ class SnappyIOVecWriter {
1228
1905
  if (to_copy > len) {
1229
1906
  to_copy = len;
1230
1907
  }
1908
+ assert(to_copy > 0);
1231
1909
 
1232
1910
  IncrementalCopy(GetIOVecPointer(from_iov, from_iov_offset),
1233
1911
  curr_iov_output_, curr_iov_output_ + to_copy,
@@ -1270,59 +1948,74 @@ class SnappyArrayWriter {
1270
1948
  char* base_;
1271
1949
  char* op_;
1272
1950
  char* op_limit_;
1951
+ // If op < op_limit_min_slop_ then it's safe to unconditionally write
1952
+ // kSlopBytes starting at op.
1953
+ char* op_limit_min_slop_;
1273
1954
 
1274
1955
  public:
1275
1956
  inline explicit SnappyArrayWriter(char* dst)
1276
1957
  : base_(dst),
1277
1958
  op_(dst),
1278
- op_limit_(dst) {
1279
- }
1959
+ op_limit_(dst),
1960
+ op_limit_min_slop_(dst) {} // Safe default see invariant.
1280
1961
 
1281
1962
  inline void SetExpectedLength(size_t len) {
1282
1963
  op_limit_ = op_ + len;
1964
+ // Prevent pointer from being past the buffer.
1965
+ op_limit_min_slop_ = op_limit_ - std::min<size_t>(kSlopBytes - 1, len);
1283
1966
  }
1284
1967
 
1285
- inline bool CheckLength() const {
1286
- return op_ == op_limit_;
1968
+ inline bool CheckLength() const { return op_ == op_limit_; }
1969
+
1970
+ char* GetOutputPtr() { return op_; }
1971
+ char* GetBase(ptrdiff_t* op_limit_min_slop) {
1972
+ *op_limit_min_slop = op_limit_min_slop_ - base_;
1973
+ return base_;
1287
1974
  }
1975
+ void SetOutputPtr(char* op) { op_ = op; }
1288
1976
 
1289
- inline bool Append(const char* ip, size_t len) {
1290
- char* op = op_;
1977
+ inline bool Append(const char* ip, size_t len, char** op_p) {
1978
+ char* op = *op_p;
1291
1979
  const size_t space_left = op_limit_ - op;
1292
- if (space_left < len) {
1293
- return false;
1294
- }
1295
- memcpy(op, ip, len);
1296
- op_ = op + len;
1980
+ if (space_left < len) return false;
1981
+ std::memcpy(op, ip, len);
1982
+ *op_p = op + len;
1297
1983
  return true;
1298
1984
  }
1299
1985
 
1300
- inline bool TryFastAppend(const char* ip, size_t available, size_t len) {
1301
- char* op = op_;
1986
+ inline bool TryFastAppend(const char* ip, size_t available, size_t len,
1987
+ char** op_p) {
1988
+ char* op = *op_p;
1302
1989
  const size_t space_left = op_limit_ - op;
1303
1990
  if (len <= 16 && available >= 16 + kMaximumTagLength && space_left >= 16) {
1304
1991
  // Fast path, used for the majority (about 95%) of invocations.
1305
1992
  UnalignedCopy128(ip, op);
1306
- op_ = op + len;
1993
+ *op_p = op + len;
1307
1994
  return true;
1308
1995
  } else {
1309
1996
  return false;
1310
1997
  }
1311
1998
  }
1312
1999
 
1313
- inline bool AppendFromSelf(size_t offset, size_t len) {
1314
- char* const op_end = op_ + len;
2000
+ SNAPPY_ATTRIBUTE_ALWAYS_INLINE
2001
+ inline bool AppendFromSelf(size_t offset, size_t len, char** op_p) {
2002
+ assert(len > 0);
2003
+ char* const op = *op_p;
2004
+ assert(op >= base_);
2005
+ char* const op_end = op + len;
1315
2006
 
1316
2007
  // Check if we try to append from before the start of the buffer.
1317
- // Normally this would just be a check for "produced < offset",
1318
- // but "produced <= offset - 1u" is equivalent for every case
1319
- // except the one where offset==0, where the right side will wrap around
1320
- // to a very big number. This is convenient, as offset==0 is another
1321
- // invalid case that we also want to catch, so that we do not go
1322
- // into an infinite loop.
1323
- if (Produced() <= offset - 1u || op_end > op_limit_) return false;
1324
- op_ = IncrementalCopy(op_ - offset, op_, op_end, op_limit_);
2008
+ if (SNAPPY_PREDICT_FALSE(static_cast<size_t>(op - base_) < offset))
2009
+ return false;
1325
2010
 
2011
+ if (SNAPPY_PREDICT_FALSE((kSlopBytes < 64 && len > kSlopBytes) ||
2012
+ op >= op_limit_min_slop_ || offset < len)) {
2013
+ if (op_end > op_limit_ || offset == 0) return false;
2014
+ *op_p = IncrementalCopy(op - offset, op, op_end, op_limit_);
2015
+ return true;
2016
+ }
2017
+ std::memmove(op, op - offset, kSlopBytes);
2018
+ *op_p = op_end;
1326
2019
  return true;
1327
2020
  }
1328
2021
  inline size_t Produced() const {
@@ -1332,8 +2025,9 @@ class SnappyArrayWriter {
1332
2025
  inline void Flush() {}
1333
2026
  };
1334
2027
 
1335
- bool RawUncompress(const char* compressed, size_t n, char* uncompressed) {
1336
- ByteArraySource reader(compressed, n);
2028
+ bool RawUncompress(const char* compressed, size_t compressed_length,
2029
+ char* uncompressed) {
2030
+ ByteArraySource reader(compressed, compressed_length);
1337
2031
  return RawUncompress(&reader, uncompressed);
1338
2032
  }
1339
2033
 
@@ -1342,9 +2036,10 @@ bool RawUncompress(Source* compressed, char* uncompressed) {
1342
2036
  return InternalUncompress(compressed, &output);
1343
2037
  }
1344
2038
 
1345
- bool Uncompress(const char* compressed, size_t n, std::string* uncompressed) {
2039
+ bool Uncompress(const char* compressed, size_t compressed_length,
2040
+ std::string* uncompressed) {
1346
2041
  size_t ulength;
1347
- if (!GetUncompressedLength(compressed, n, &ulength)) {
2042
+ if (!GetUncompressedLength(compressed, compressed_length, &ulength)) {
1348
2043
  return false;
1349
2044
  }
1350
2045
  // On 32-bit builds: max_size() < kuint32max. Check for that instead
@@ -1353,7 +2048,8 @@ bool Uncompress(const char* compressed, size_t n, std::string* uncompressed) {
1353
2048
  return false;
1354
2049
  }
1355
2050
  STLStringResizeUninitialized(uncompressed, ulength);
1356
- return RawUncompress(compressed, n, string_as_array(uncompressed));
2051
+ return RawUncompress(compressed, compressed_length,
2052
+ string_as_array(uncompressed));
1357
2053
  }
1358
2054
 
1359
2055
  // A Writer that drops everything on the floor and just does validation
@@ -1363,32 +2059,44 @@ class SnappyDecompressionValidator {
1363
2059
  size_t produced_;
1364
2060
 
1365
2061
  public:
1366
- inline SnappyDecompressionValidator() : expected_(0), produced_(0) { }
1367
- inline void SetExpectedLength(size_t len) {
1368
- expected_ = len;
1369
- }
1370
- inline bool CheckLength() const {
1371
- return expected_ == produced_;
2062
+ inline SnappyDecompressionValidator() : expected_(0), produced_(0) {}
2063
+ inline void SetExpectedLength(size_t len) { expected_ = len; }
2064
+ size_t GetOutputPtr() { return produced_; }
2065
+ size_t GetBase(ptrdiff_t* op_limit_min_slop) {
2066
+ *op_limit_min_slop = std::numeric_limits<ptrdiff_t>::max() - kSlopBytes + 1;
2067
+ return 1;
1372
2068
  }
1373
- inline bool Append(const char* ip, size_t len) {
1374
- produced_ += len;
1375
- return produced_ <= expected_;
2069
+ void SetOutputPtr(size_t op) { produced_ = op; }
2070
+ inline bool CheckLength() const { return expected_ == produced_; }
2071
+ inline bool Append(const char* ip, size_t len, size_t* produced) {
2072
+ // TODO: Switch to [[maybe_unused]] when we can assume C++17.
2073
+ (void)ip;
2074
+
2075
+ *produced += len;
2076
+ return *produced <= expected_;
1376
2077
  }
1377
- inline bool TryFastAppend(const char* ip, size_t available, size_t length) {
2078
+ inline bool TryFastAppend(const char* ip, size_t available, size_t length,
2079
+ size_t* produced) {
2080
+ // TODO: Switch to [[maybe_unused]] when we can assume C++17.
2081
+ (void)ip;
2082
+ (void)available;
2083
+ (void)length;
2084
+ (void)produced;
2085
+
1378
2086
  return false;
1379
2087
  }
1380
- inline bool AppendFromSelf(size_t offset, size_t len) {
2088
+ inline bool AppendFromSelf(size_t offset, size_t len, size_t* produced) {
1381
2089
  // See SnappyArrayWriter::AppendFromSelf for an explanation of
1382
2090
  // the "offset - 1u" trick.
1383
- if (produced_ <= offset - 1u) return false;
1384
- produced_ += len;
1385
- return produced_ <= expected_;
2091
+ if (*produced <= offset - 1u) return false;
2092
+ *produced += len;
2093
+ return *produced <= expected_;
1386
2094
  }
1387
2095
  inline void Flush() {}
1388
2096
  };
1389
2097
 
1390
- bool IsValidCompressedBuffer(const char* compressed, size_t n) {
1391
- ByteArraySource reader(compressed, n);
2098
+ bool IsValidCompressedBuffer(const char* compressed, size_t compressed_length) {
2099
+ ByteArraySource reader(compressed, compressed_length);
1392
2100
  SnappyDecompressionValidator writer;
1393
2101
  return InternalUncompress(&reader, &writer);
1394
2102
  }
@@ -1398,9 +2106,7 @@ bool IsValidCompressed(Source* compressed) {
1398
2106
  return InternalUncompress(compressed, &writer);
1399
2107
  }
1400
2108
 
1401
- void RawCompress(const char* input,
1402
- size_t input_length,
1403
- char* compressed,
2109
+ void RawCompress(const char* input, size_t input_length, char* compressed,
1404
2110
  size_t* compressed_length) {
1405
2111
  ByteArraySource reader(input, input_length);
1406
2112
  UncheckedByteArraySink writer(compressed);
@@ -1410,6 +2116,16 @@ void RawCompress(const char* input,
1410
2116
  *compressed_length = (writer.CurrentDestination() - compressed);
1411
2117
  }
1412
2118
 
2119
+ void RawCompressFromIOVec(const struct iovec* iov, size_t uncompressed_length,
2120
+ char* compressed, size_t* compressed_length) {
2121
+ SnappyIOVecReader reader(iov, uncompressed_length);
2122
+ UncheckedByteArraySink writer(compressed);
2123
+ Compress(&reader, &writer);
2124
+
2125
+ // Compute how many bytes were added.
2126
+ *compressed_length = writer.CurrentDestination() - compressed;
2127
+ }
2128
+
1413
2129
  size_t Compress(const char* input, size_t input_length,
1414
2130
  std::string* compressed) {
1415
2131
  // Pre-grow the buffer to the max length of the compressed output
@@ -1418,7 +2134,26 @@ size_t Compress(const char* input, size_t input_length,
1418
2134
  size_t compressed_length;
1419
2135
  RawCompress(input, input_length, string_as_array(compressed),
1420
2136
  &compressed_length);
1421
- compressed->resize(compressed_length);
2137
+ compressed->erase(compressed_length);
2138
+ return compressed_length;
2139
+ }
2140
+
2141
+ size_t CompressFromIOVec(const struct iovec* iov, size_t iov_cnt,
2142
+ std::string* compressed) {
2143
+ // Compute the number of bytes to be compressed.
2144
+ size_t uncompressed_length = 0;
2145
+ for (size_t i = 0; i < iov_cnt; ++i) {
2146
+ uncompressed_length += iov[i].iov_len;
2147
+ }
2148
+
2149
+ // Pre-grow the buffer to the max length of the compressed output.
2150
+ STLStringResizeUninitialized(compressed, MaxCompressedLength(
2151
+ uncompressed_length));
2152
+
2153
+ size_t compressed_length;
2154
+ RawCompressFromIOVec(iov, uncompressed_length, string_as_array(compressed),
2155
+ &compressed_length);
2156
+ compressed->erase(compressed_length);
1422
2157
  return compressed_length;
1423
2158
  }
1424
2159
 
@@ -1443,13 +2178,14 @@ class SnappyScatteredWriter {
1443
2178
  size_t full_size_;
1444
2179
 
1445
2180
  // Pointer into current output block
1446
- char* op_base_; // Base of output block
1447
- char* op_ptr_; // Pointer to next unfilled byte in block
1448
- char* op_limit_; // Pointer just past block
2181
+ char* op_base_; // Base of output block
2182
+ char* op_ptr_; // Pointer to next unfilled byte in block
2183
+ char* op_limit_; // Pointer just past block
2184
+ // If op < op_limit_min_slop_ then it's safe to unconditionally write
2185
+ // kSlopBytes starting at op.
2186
+ char* op_limit_min_slop_;
1449
2187
 
1450
- inline size_t Size() const {
1451
- return full_size_ + (op_ptr_ - op_base_);
1452
- }
2188
+ inline size_t Size() const { return full_size_ + (op_ptr_ - op_base_); }
1453
2189
 
1454
2190
  bool SlowAppend(const char* ip, size_t len);
1455
2191
  bool SlowAppendFromSelf(size_t offset, size_t len);
@@ -1460,60 +2196,79 @@ class SnappyScatteredWriter {
1460
2196
  full_size_(0),
1461
2197
  op_base_(NULL),
1462
2198
  op_ptr_(NULL),
1463
- op_limit_(NULL) {
2199
+ op_limit_(NULL),
2200
+ op_limit_min_slop_(NULL) {}
2201
+ char* GetOutputPtr() { return op_ptr_; }
2202
+ char* GetBase(ptrdiff_t* op_limit_min_slop) {
2203
+ *op_limit_min_slop = op_limit_min_slop_ - op_base_;
2204
+ return op_base_;
1464
2205
  }
2206
+ void SetOutputPtr(char* op) { op_ptr_ = op; }
1465
2207
 
1466
2208
  inline void SetExpectedLength(size_t len) {
1467
2209
  assert(blocks_.empty());
1468
2210
  expected_ = len;
1469
2211
  }
1470
2212
 
1471
- inline bool CheckLength() const {
1472
- return Size() == expected_;
1473
- }
2213
+ inline bool CheckLength() const { return Size() == expected_; }
1474
2214
 
1475
2215
  // Return the number of bytes actually uncompressed so far
1476
- inline size_t Produced() const {
1477
- return Size();
1478
- }
2216
+ inline size_t Produced() const { return Size(); }
1479
2217
 
1480
- inline bool Append(const char* ip, size_t len) {
1481
- size_t avail = op_limit_ - op_ptr_;
2218
+ inline bool Append(const char* ip, size_t len, char** op_p) {
2219
+ char* op = *op_p;
2220
+ size_t avail = op_limit_ - op;
1482
2221
  if (len <= avail) {
1483
2222
  // Fast path
1484
- memcpy(op_ptr_, ip, len);
1485
- op_ptr_ += len;
2223
+ std::memcpy(op, ip, len);
2224
+ *op_p = op + len;
1486
2225
  return true;
1487
2226
  } else {
1488
- return SlowAppend(ip, len);
2227
+ op_ptr_ = op;
2228
+ bool res = SlowAppend(ip, len);
2229
+ *op_p = op_ptr_;
2230
+ return res;
1489
2231
  }
1490
2232
  }
1491
2233
 
1492
- inline bool TryFastAppend(const char* ip, size_t available, size_t length) {
1493
- char* op = op_ptr_;
2234
+ inline bool TryFastAppend(const char* ip, size_t available, size_t length,
2235
+ char** op_p) {
2236
+ char* op = *op_p;
1494
2237
  const int space_left = op_limit_ - op;
1495
2238
  if (length <= 16 && available >= 16 + kMaximumTagLength &&
1496
2239
  space_left >= 16) {
1497
2240
  // Fast path, used for the majority (about 95%) of invocations.
1498
2241
  UnalignedCopy128(ip, op);
1499
- op_ptr_ = op + length;
2242
+ *op_p = op + length;
1500
2243
  return true;
1501
2244
  } else {
1502
2245
  return false;
1503
2246
  }
1504
2247
  }
1505
2248
 
1506
- inline bool AppendFromSelf(size_t offset, size_t len) {
1507
- char* const op_end = op_ptr_ + len;
1508
- // See SnappyArrayWriter::AppendFromSelf for an explanation of
1509
- // the "offset - 1u" trick.
1510
- if (SNAPPY_PREDICT_TRUE(offset - 1u < op_ptr_ - op_base_ &&
1511
- op_end <= op_limit_)) {
1512
- // Fast path: src and dst in current block.
1513
- op_ptr_ = IncrementalCopy(op_ptr_ - offset, op_ptr_, op_end, op_limit_);
2249
+ inline bool AppendFromSelf(size_t offset, size_t len, char** op_p) {
2250
+ char* op = *op_p;
2251
+ assert(op >= op_base_);
2252
+ // Check if we try to append from before the start of the buffer.
2253
+ if (SNAPPY_PREDICT_FALSE((kSlopBytes < 64 && len > kSlopBytes) ||
2254
+ static_cast<size_t>(op - op_base_) < offset ||
2255
+ op >= op_limit_min_slop_ || offset < len)) {
2256
+ if (offset == 0) return false;
2257
+ if (SNAPPY_PREDICT_FALSE(static_cast<size_t>(op - op_base_) < offset ||
2258
+ op + len > op_limit_)) {
2259
+ op_ptr_ = op;
2260
+ bool res = SlowAppendFromSelf(offset, len);
2261
+ *op_p = op_ptr_;
2262
+ return res;
2263
+ }
2264
+ *op_p = IncrementalCopy(op - offset, op, op + len, op_limit_);
1514
2265
  return true;
1515
2266
  }
1516
- return SlowAppendFromSelf(offset, len);
2267
+ // Fast path
2268
+ char* const op_end = op + len;
2269
+ std::memmove(op, op - offset, kSlopBytes);
2270
+ *op_p = op_end;
2271
+ return true;
1517
2272
  }
1518
2273
 
1519
2274
  // Called at the end of the decompress. We ask the allocator
@@ -1521,12 +2276,12 @@ class SnappyScatteredWriter {
1521
2276
  inline void Flush() { allocator_.Flush(Produced()); }
1522
2277
  };
1523
2278
 
1524
- template<typename Allocator>
2279
+ template <typename Allocator>
1525
2280
  bool SnappyScatteredWriter<Allocator>::SlowAppend(const char* ip, size_t len) {
1526
2281
  size_t avail = op_limit_ - op_ptr_;
1527
2282
  while (len > avail) {
1528
2283
  // Completely fill this block
1529
- memcpy(op_ptr_, ip, avail);
2284
+ std::memcpy(op_ptr_, ip, avail);
1530
2285
  op_ptr_ += avail;
1531
2286
  assert(op_limit_ - op_ptr_ == 0);
1532
2287
  full_size_ += (op_ptr_ - op_base_);
@@ -1534,25 +2289,25 @@ bool SnappyScatteredWriter<Allocator>::SlowAppend(const char* ip, size_t len) {
1534
2289
  ip += avail;
1535
2290
 
1536
2291
  // Bounds check
1537
- if (full_size_ + len > expected_) {
1538
- return false;
1539
- }
2292
+ if (full_size_ + len > expected_) return false;
1540
2293
 
1541
2294
  // Make new block
1542
2295
  size_t bsize = std::min<size_t>(kBlockSize, expected_ - full_size_);
1543
2296
  op_base_ = allocator_.Allocate(bsize);
1544
2297
  op_ptr_ = op_base_;
1545
2298
  op_limit_ = op_base_ + bsize;
2299
+ op_limit_min_slop_ = op_limit_ - std::min<size_t>(kSlopBytes - 1, bsize);
2300
+
1546
2301
  blocks_.push_back(op_base_);
1547
2302
  avail = bsize;
1548
2303
  }
1549
2304
 
1550
- memcpy(op_ptr_, ip, len);
2305
+ std::memcpy(op_ptr_, ip, len);
1551
2306
  op_ptr_ += len;
1552
2307
  return true;
1553
2308
  }
1554
2309
 
1555
- template<typename Allocator>
2310
+ template <typename Allocator>
1556
2311
  bool SnappyScatteredWriter<Allocator>::SlowAppendFromSelf(size_t offset,
1557
2312
  size_t len) {
1558
2313
  // Overflow check
@@ -1567,18 +2322,26 @@ bool SnappyScatteredWriter<Allocator>::SlowAppendFromSelf(size_t offset,
1567
2322
  // nice if we do not rely on that, since we can get better compression if we
1568
2323
  // allow cross-block copies and thus might want to change the compressor in
1569
2324
  // the future.
2325
+ // TODO Replace this with a properly optimized path. This is not
2326
+ // triggered right now. But this is so super slow, that it would regress
2327
+ // performance unacceptably if triggered.
1570
2328
  size_t src = cur - offset;
2329
+ char* op = op_ptr_;
1571
2330
  while (len-- > 0) {
1572
- char c = blocks_[src >> kBlockLog][src & (kBlockSize-1)];
1573
- Append(&c, 1);
2331
+ char c = blocks_[src >> kBlockLog][src & (kBlockSize - 1)];
2332
+ if (!Append(&c, 1, &op)) {
2333
+ op_ptr_ = op;
2334
+ return false;
2335
+ }
1574
2336
  src++;
1575
2337
  }
2338
+ op_ptr_ = op;
1576
2339
  return true;
1577
2340
  }
1578
2341
 
1579
2342
  class SnappySinkAllocator {
1580
2343
  public:
1581
- explicit SnappySinkAllocator(Sink* dest): dest_(dest) {}
2344
+ explicit SnappySinkAllocator(Sink* dest) : dest_(dest) {}
1582
2345
  ~SnappySinkAllocator() {}
1583
2346
 
1584
2347
  char* Allocate(int size) {
@@ -1594,10 +2357,9 @@ class SnappySinkAllocator {
1594
2357
  // to the blocks.
1595
2358
  void Flush(size_t size) {
1596
2359
  size_t size_written = 0;
1597
- size_t block_size;
1598
- for (int i = 0; i < blocks_.size(); ++i) {
1599
- block_size = std::min<size_t>(blocks_[i].size, size - size_written);
1600
- dest_->AppendAndTakeOwnership(blocks_[i].data, block_size,
2360
+ for (Datablock& block : blocks_) {
2361
+ size_t block_size = std::min<size_t>(block.size, size - size_written);
2362
+ dest_->AppendAndTakeOwnership(block.data, block_size,
1601
2363
  &SnappySinkAllocator::Deleter, NULL);
1602
2364
  size_written += block_size;
1603
2365
  }
@@ -1612,6 +2374,10 @@ class SnappySinkAllocator {
1612
2374
  };
1613
2375
 
1614
2376
  static void Deleter(void* arg, const char* bytes, size_t size) {
2377
+ // TODO: Switch to [[maybe_unused]] when we can assume C++17.
2378
+ (void)arg;
2379
+ (void)size;
2380
+
1615
2381
  delete[] bytes;
1616
2382
  }
1617
2383
 
@@ -1631,15 +2397,15 @@ size_t UncompressAsMuchAsPossible(Source* compressed, Sink* uncompressed) {
1631
2397
  bool Uncompress(Source* compressed, Sink* uncompressed) {
1632
2398
  // Read the uncompressed length from the front of the compressed input
1633
2399
  SnappyDecompressor decompressor(compressed);
1634
- uint32 uncompressed_len = 0;
2400
+ uint32_t uncompressed_len = 0;
1635
2401
  if (!decompressor.ReadUncompressedLength(&uncompressed_len)) {
1636
2402
  return false;
1637
2403
  }
1638
2404
 
1639
2405
  char c;
1640
2406
  size_t allocated_size;
1641
- char* buf = uncompressed->GetAppendBufferVariable(
1642
- 1, uncompressed_len, &c, 1, &allocated_size);
2407
+ char* buf = uncompressed->GetAppendBufferVariable(1, uncompressed_len, &c, 1,
2408
+ &allocated_size);
1643
2409
 
1644
2410
  const size_t compressed_len = compressed->Available();
1645
2411
  // If we can get a flat buffer, then use it, otherwise do block by block