2
0

class_packedbytearray.rst 78 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208
  1. :github_url: hide
  2. .. DO NOT EDIT THIS FILE!!!
  3. .. Generated automatically from Godot engine sources.
  4. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/PackedByteArray.xml.
  6. .. _class_PackedByteArray:
  7. PackedByteArray
  8. ===============
  9. A packed array of bytes.
  10. .. rst-class:: classref-introduction-group
  11. Description
  12. -----------
  13. An array specifically designed to hold bytes. Packs data tightly, so it saves memory for large array sizes.
  14. \ **PackedByteArray** also provides methods to encode/decode various types to/from bytes. The way values are encoded is an implementation detail and shouldn't be relied upon when interacting with external apps.
  15. \ **Note:** Packed arrays are always passed by reference. To get a copy of an array that can be modified independently of the original array, use :ref:`duplicate()<class_PackedByteArray_method_duplicate>`. This is *not* the case for built-in properties and methods. In these cases the returned packed array is a copy, and changing it will *not* affect the original value. To update a built-in property of this type, modify the returned array and then assign it to the property again.
  16. .. note::
  17. There are notable differences when using this API with C#. See :ref:`doc_c_sharp_differences` for more information.
  18. .. rst-class:: classref-reftable-group
  19. Constructors
  20. ------------
  21. .. table::
  22. :widths: auto
  23. +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+
  24. | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`PackedByteArray<class_PackedByteArray_constructor_PackedByteArray>`\ (\ ) |
  25. +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+
  26. | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`PackedByteArray<class_PackedByteArray_constructor_PackedByteArray>`\ (\ from\: :ref:`PackedByteArray<class_PackedByteArray>`\ ) |
  27. +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+
  28. | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`PackedByteArray<class_PackedByteArray_constructor_PackedByteArray>`\ (\ from\: :ref:`Array<class_Array>`\ ) |
  29. +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+
  30. .. rst-class:: classref-reftable-group
  31. Methods
  32. -------
  33. .. table::
  34. :widths: auto
  35. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  36. | :ref:`bool<class_bool>` | :ref:`append<class_PackedByteArray_method_append>`\ (\ value\: :ref:`int<class_int>`\ ) |
  37. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  38. | |void| | :ref:`append_array<class_PackedByteArray_method_append_array>`\ (\ array\: :ref:`PackedByteArray<class_PackedByteArray>`\ ) |
  39. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  40. | :ref:`int<class_int>` | :ref:`bsearch<class_PackedByteArray_method_bsearch>`\ (\ value\: :ref:`int<class_int>`, before\: :ref:`bool<class_bool>` = true\ ) |
  41. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  42. | |void| | :ref:`bswap16<class_PackedByteArray_method_bswap16>`\ (\ offset\: :ref:`int<class_int>` = 0, count\: :ref:`int<class_int>` = -1\ ) |
  43. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  44. | |void| | :ref:`bswap32<class_PackedByteArray_method_bswap32>`\ (\ offset\: :ref:`int<class_int>` = 0, count\: :ref:`int<class_int>` = -1\ ) |
  45. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  46. | |void| | :ref:`bswap64<class_PackedByteArray_method_bswap64>`\ (\ offset\: :ref:`int<class_int>` = 0, count\: :ref:`int<class_int>` = -1\ ) |
  47. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  48. | |void| | :ref:`clear<class_PackedByteArray_method_clear>`\ (\ ) |
  49. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  50. | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`compress<class_PackedByteArray_method_compress>`\ (\ compression_mode\: :ref:`int<class_int>` = 0\ ) |const| |
  51. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  52. | :ref:`int<class_int>` | :ref:`count<class_PackedByteArray_method_count>`\ (\ value\: :ref:`int<class_int>`\ ) |const| |
  53. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  54. | :ref:`float<class_float>` | :ref:`decode_double<class_PackedByteArray_method_decode_double>`\ (\ byte_offset\: :ref:`int<class_int>`\ ) |const| |
  55. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  56. | :ref:`float<class_float>` | :ref:`decode_float<class_PackedByteArray_method_decode_float>`\ (\ byte_offset\: :ref:`int<class_int>`\ ) |const| |
  57. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  58. | :ref:`float<class_float>` | :ref:`decode_half<class_PackedByteArray_method_decode_half>`\ (\ byte_offset\: :ref:`int<class_int>`\ ) |const| |
  59. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  60. | :ref:`int<class_int>` | :ref:`decode_s8<class_PackedByteArray_method_decode_s8>`\ (\ byte_offset\: :ref:`int<class_int>`\ ) |const| |
  61. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  62. | :ref:`int<class_int>` | :ref:`decode_s16<class_PackedByteArray_method_decode_s16>`\ (\ byte_offset\: :ref:`int<class_int>`\ ) |const| |
  63. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  64. | :ref:`int<class_int>` | :ref:`decode_s32<class_PackedByteArray_method_decode_s32>`\ (\ byte_offset\: :ref:`int<class_int>`\ ) |const| |
  65. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  66. | :ref:`int<class_int>` | :ref:`decode_s64<class_PackedByteArray_method_decode_s64>`\ (\ byte_offset\: :ref:`int<class_int>`\ ) |const| |
  67. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  68. | :ref:`int<class_int>` | :ref:`decode_u8<class_PackedByteArray_method_decode_u8>`\ (\ byte_offset\: :ref:`int<class_int>`\ ) |const| |
  69. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  70. | :ref:`int<class_int>` | :ref:`decode_u16<class_PackedByteArray_method_decode_u16>`\ (\ byte_offset\: :ref:`int<class_int>`\ ) |const| |
  71. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  72. | :ref:`int<class_int>` | :ref:`decode_u32<class_PackedByteArray_method_decode_u32>`\ (\ byte_offset\: :ref:`int<class_int>`\ ) |const| |
  73. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  74. | :ref:`int<class_int>` | :ref:`decode_u64<class_PackedByteArray_method_decode_u64>`\ (\ byte_offset\: :ref:`int<class_int>`\ ) |const| |
  75. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  76. | :ref:`Variant<class_Variant>` | :ref:`decode_var<class_PackedByteArray_method_decode_var>`\ (\ byte_offset\: :ref:`int<class_int>`, allow_objects\: :ref:`bool<class_bool>` = false\ ) |const| |
  77. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  78. | :ref:`int<class_int>` | :ref:`decode_var_size<class_PackedByteArray_method_decode_var_size>`\ (\ byte_offset\: :ref:`int<class_int>`, allow_objects\: :ref:`bool<class_bool>` = false\ ) |const| |
  79. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  80. | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`decompress<class_PackedByteArray_method_decompress>`\ (\ buffer_size\: :ref:`int<class_int>`, compression_mode\: :ref:`int<class_int>` = 0\ ) |const| |
  81. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  82. | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`decompress_dynamic<class_PackedByteArray_method_decompress_dynamic>`\ (\ max_output_size\: :ref:`int<class_int>`, compression_mode\: :ref:`int<class_int>` = 0\ ) |const| |
  83. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  84. | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`duplicate<class_PackedByteArray_method_duplicate>`\ (\ ) |
  85. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  86. | |void| | :ref:`encode_double<class_PackedByteArray_method_encode_double>`\ (\ byte_offset\: :ref:`int<class_int>`, value\: :ref:`float<class_float>`\ ) |
  87. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  88. | |void| | :ref:`encode_float<class_PackedByteArray_method_encode_float>`\ (\ byte_offset\: :ref:`int<class_int>`, value\: :ref:`float<class_float>`\ ) |
  89. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  90. | |void| | :ref:`encode_half<class_PackedByteArray_method_encode_half>`\ (\ byte_offset\: :ref:`int<class_int>`, value\: :ref:`float<class_float>`\ ) |
  91. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  92. | |void| | :ref:`encode_s8<class_PackedByteArray_method_encode_s8>`\ (\ byte_offset\: :ref:`int<class_int>`, value\: :ref:`int<class_int>`\ ) |
  93. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  94. | |void| | :ref:`encode_s16<class_PackedByteArray_method_encode_s16>`\ (\ byte_offset\: :ref:`int<class_int>`, value\: :ref:`int<class_int>`\ ) |
  95. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  96. | |void| | :ref:`encode_s32<class_PackedByteArray_method_encode_s32>`\ (\ byte_offset\: :ref:`int<class_int>`, value\: :ref:`int<class_int>`\ ) |
  97. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  98. | |void| | :ref:`encode_s64<class_PackedByteArray_method_encode_s64>`\ (\ byte_offset\: :ref:`int<class_int>`, value\: :ref:`int<class_int>`\ ) |
  99. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  100. | |void| | :ref:`encode_u8<class_PackedByteArray_method_encode_u8>`\ (\ byte_offset\: :ref:`int<class_int>`, value\: :ref:`int<class_int>`\ ) |
  101. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  102. | |void| | :ref:`encode_u16<class_PackedByteArray_method_encode_u16>`\ (\ byte_offset\: :ref:`int<class_int>`, value\: :ref:`int<class_int>`\ ) |
  103. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  104. | |void| | :ref:`encode_u32<class_PackedByteArray_method_encode_u32>`\ (\ byte_offset\: :ref:`int<class_int>`, value\: :ref:`int<class_int>`\ ) |
  105. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  106. | |void| | :ref:`encode_u64<class_PackedByteArray_method_encode_u64>`\ (\ byte_offset\: :ref:`int<class_int>`, value\: :ref:`int<class_int>`\ ) |
  107. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  108. | :ref:`int<class_int>` | :ref:`encode_var<class_PackedByteArray_method_encode_var>`\ (\ byte_offset\: :ref:`int<class_int>`, value\: :ref:`Variant<class_Variant>`, allow_objects\: :ref:`bool<class_bool>` = false\ ) |
  109. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  110. | :ref:`bool<class_bool>` | :ref:`erase<class_PackedByteArray_method_erase>`\ (\ value\: :ref:`int<class_int>`\ ) |
  111. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  112. | |void| | :ref:`fill<class_PackedByteArray_method_fill>`\ (\ value\: :ref:`int<class_int>`\ ) |
  113. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  114. | :ref:`int<class_int>` | :ref:`find<class_PackedByteArray_method_find>`\ (\ value\: :ref:`int<class_int>`, from\: :ref:`int<class_int>` = 0\ ) |const| |
  115. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  116. | :ref:`int<class_int>` | :ref:`get<class_PackedByteArray_method_get>`\ (\ index\: :ref:`int<class_int>`\ ) |const| |
  117. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  118. | :ref:`String<class_String>` | :ref:`get_string_from_ascii<class_PackedByteArray_method_get_string_from_ascii>`\ (\ ) |const| |
  119. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  120. | :ref:`String<class_String>` | :ref:`get_string_from_multibyte_char<class_PackedByteArray_method_get_string_from_multibyte_char>`\ (\ encoding\: :ref:`String<class_String>` = ""\ ) |const| |
  121. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  122. | :ref:`String<class_String>` | :ref:`get_string_from_utf8<class_PackedByteArray_method_get_string_from_utf8>`\ (\ ) |const| |
  123. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  124. | :ref:`String<class_String>` | :ref:`get_string_from_utf16<class_PackedByteArray_method_get_string_from_utf16>`\ (\ ) |const| |
  125. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  126. | :ref:`String<class_String>` | :ref:`get_string_from_utf32<class_PackedByteArray_method_get_string_from_utf32>`\ (\ ) |const| |
  127. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  128. | :ref:`String<class_String>` | :ref:`get_string_from_wchar<class_PackedByteArray_method_get_string_from_wchar>`\ (\ ) |const| |
  129. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  130. | :ref:`bool<class_bool>` | :ref:`has<class_PackedByteArray_method_has>`\ (\ value\: :ref:`int<class_int>`\ ) |const| |
  131. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  132. | :ref:`bool<class_bool>` | :ref:`has_encoded_var<class_PackedByteArray_method_has_encoded_var>`\ (\ byte_offset\: :ref:`int<class_int>`, allow_objects\: :ref:`bool<class_bool>` = false\ ) |const| |
  133. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  134. | :ref:`String<class_String>` | :ref:`hex_encode<class_PackedByteArray_method_hex_encode>`\ (\ ) |const| |
  135. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  136. | :ref:`int<class_int>` | :ref:`insert<class_PackedByteArray_method_insert>`\ (\ at_index\: :ref:`int<class_int>`, value\: :ref:`int<class_int>`\ ) |
  137. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  138. | :ref:`bool<class_bool>` | :ref:`is_empty<class_PackedByteArray_method_is_empty>`\ (\ ) |const| |
  139. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  140. | :ref:`bool<class_bool>` | :ref:`push_back<class_PackedByteArray_method_push_back>`\ (\ value\: :ref:`int<class_int>`\ ) |
  141. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  142. | |void| | :ref:`remove_at<class_PackedByteArray_method_remove_at>`\ (\ index\: :ref:`int<class_int>`\ ) |
  143. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  144. | :ref:`int<class_int>` | :ref:`resize<class_PackedByteArray_method_resize>`\ (\ new_size\: :ref:`int<class_int>`\ ) |
  145. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  146. | |void| | :ref:`reverse<class_PackedByteArray_method_reverse>`\ (\ ) |
  147. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  148. | :ref:`int<class_int>` | :ref:`rfind<class_PackedByteArray_method_rfind>`\ (\ value\: :ref:`int<class_int>`, from\: :ref:`int<class_int>` = -1\ ) |const| |
  149. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  150. | |void| | :ref:`set<class_PackedByteArray_method_set>`\ (\ index\: :ref:`int<class_int>`, value\: :ref:`int<class_int>`\ ) |
  151. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  152. | :ref:`int<class_int>` | :ref:`size<class_PackedByteArray_method_size>`\ (\ ) |const| |
  153. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  154. | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`slice<class_PackedByteArray_method_slice>`\ (\ begin\: :ref:`int<class_int>`, end\: :ref:`int<class_int>` = 2147483647\ ) |const| |
  155. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  156. | |void| | :ref:`sort<class_PackedByteArray_method_sort>`\ (\ ) |
  157. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  158. | :ref:`PackedColorArray<class_PackedColorArray>` | :ref:`to_color_array<class_PackedByteArray_method_to_color_array>`\ (\ ) |const| |
  159. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  160. | :ref:`PackedFloat32Array<class_PackedFloat32Array>` | :ref:`to_float32_array<class_PackedByteArray_method_to_float32_array>`\ (\ ) |const| |
  161. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  162. | :ref:`PackedFloat64Array<class_PackedFloat64Array>` | :ref:`to_float64_array<class_PackedByteArray_method_to_float64_array>`\ (\ ) |const| |
  163. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  164. | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`to_int32_array<class_PackedByteArray_method_to_int32_array>`\ (\ ) |const| |
  165. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  166. | :ref:`PackedInt64Array<class_PackedInt64Array>` | :ref:`to_int64_array<class_PackedByteArray_method_to_int64_array>`\ (\ ) |const| |
  167. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  168. | :ref:`PackedVector2Array<class_PackedVector2Array>` | :ref:`to_vector2_array<class_PackedByteArray_method_to_vector2_array>`\ (\ ) |const| |
  169. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  170. | :ref:`PackedVector3Array<class_PackedVector3Array>` | :ref:`to_vector3_array<class_PackedByteArray_method_to_vector3_array>`\ (\ ) |const| |
  171. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  172. | :ref:`PackedVector4Array<class_PackedVector4Array>` | :ref:`to_vector4_array<class_PackedByteArray_method_to_vector4_array>`\ (\ ) |const| |
  173. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  174. .. rst-class:: classref-reftable-group
  175. Operators
  176. ---------
  177. .. table::
  178. :widths: auto
  179. +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+
  180. | :ref:`bool<class_bool>` | :ref:`operator !=<class_PackedByteArray_operator_neq_PackedByteArray>`\ (\ right\: :ref:`PackedByteArray<class_PackedByteArray>`\ ) |
  181. +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+
  182. | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`operator +<class_PackedByteArray_operator_sum_PackedByteArray>`\ (\ right\: :ref:`PackedByteArray<class_PackedByteArray>`\ ) |
  183. +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+
  184. | :ref:`bool<class_bool>` | :ref:`operator ==<class_PackedByteArray_operator_eq_PackedByteArray>`\ (\ right\: :ref:`PackedByteArray<class_PackedByteArray>`\ ) |
  185. +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+
  186. | :ref:`int<class_int>` | :ref:`operator []<class_PackedByteArray_operator_idx_int>`\ (\ index\: :ref:`int<class_int>`\ ) |
  187. +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+
  188. .. rst-class:: classref-section-separator
  189. ----
  190. .. rst-class:: classref-descriptions-group
  191. Constructor Descriptions
  192. ------------------------
  193. .. _class_PackedByteArray_constructor_PackedByteArray:
  194. .. rst-class:: classref-constructor
  195. :ref:`PackedByteArray<class_PackedByteArray>` **PackedByteArray**\ (\ ) :ref:`🔗<class_PackedByteArray_constructor_PackedByteArray>`
  196. Constructs an empty **PackedByteArray**.
  197. .. rst-class:: classref-item-separator
  198. ----
  199. .. rst-class:: classref-constructor
  200. :ref:`PackedByteArray<class_PackedByteArray>` **PackedByteArray**\ (\ from\: :ref:`PackedByteArray<class_PackedByteArray>`\ )
  201. Constructs a **PackedByteArray** as a copy of the given **PackedByteArray**.
  202. .. rst-class:: classref-item-separator
  203. ----
  204. .. rst-class:: classref-constructor
  205. :ref:`PackedByteArray<class_PackedByteArray>` **PackedByteArray**\ (\ from\: :ref:`Array<class_Array>`\ )
  206. Constructs a new **PackedByteArray**. Optionally, you can pass in a generic :ref:`Array<class_Array>` that will be converted.
  207. .. rst-class:: classref-section-separator
  208. ----
  209. .. rst-class:: classref-descriptions-group
  210. Method Descriptions
  211. -------------------
  212. .. _class_PackedByteArray_method_append:
  213. .. rst-class:: classref-method
  214. :ref:`bool<class_bool>` **append**\ (\ value\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PackedByteArray_method_append>`
  215. Appends an element at the end of the array (alias of :ref:`push_back()<class_PackedByteArray_method_push_back>`).
  216. .. rst-class:: classref-item-separator
  217. ----
  218. .. _class_PackedByteArray_method_append_array:
  219. .. rst-class:: classref-method
  220. |void| **append_array**\ (\ array\: :ref:`PackedByteArray<class_PackedByteArray>`\ ) :ref:`🔗<class_PackedByteArray_method_append_array>`
  221. Appends a **PackedByteArray** at the end of this array.
  222. .. rst-class:: classref-item-separator
  223. ----
  224. .. _class_PackedByteArray_method_bsearch:
  225. .. rst-class:: classref-method
  226. :ref:`int<class_int>` **bsearch**\ (\ value\: :ref:`int<class_int>`, before\: :ref:`bool<class_bool>` = true\ ) :ref:`🔗<class_PackedByteArray_method_bsearch>`
  227. Finds the index of an existing value (or the insertion index that maintains sorting order, if the value is not yet present in the array) using binary search. Optionally, a ``before`` specifier can be passed. If ``false``, the returned index comes after all existing entries of the value in the array.
  228. \ **Note:** Calling :ref:`bsearch()<class_PackedByteArray_method_bsearch>` on an unsorted array results in unexpected behavior.
  229. .. rst-class:: classref-item-separator
  230. ----
  231. .. _class_PackedByteArray_method_bswap16:
  232. .. rst-class:: classref-method
  233. |void| **bswap16**\ (\ offset\: :ref:`int<class_int>` = 0, count\: :ref:`int<class_int>` = -1\ ) :ref:`🔗<class_PackedByteArray_method_bswap16>`
  234. Swaps the byte order of ``count`` 16-bit segments of the array starting at ``offset``. Swap is done in-place. If ``count`` is less than zero, all segments to the end of array are processed, if processed data size is not a multiple of 2, the byte after the last processed 16-bit segment is not modified.
  235. .. rst-class:: classref-item-separator
  236. ----
  237. .. _class_PackedByteArray_method_bswap32:
  238. .. rst-class:: classref-method
  239. |void| **bswap32**\ (\ offset\: :ref:`int<class_int>` = 0, count\: :ref:`int<class_int>` = -1\ ) :ref:`🔗<class_PackedByteArray_method_bswap32>`
  240. Swaps the byte order of ``count`` 32-bit segments of the array starting at ``offset``. Swap is done in-place. If ``count`` is less than zero, all segments to the end of array are processed, if processed data size is not a multiple of 4, bytes after the last processed 32-bit segment are not modified.
  241. .. rst-class:: classref-item-separator
  242. ----
  243. .. _class_PackedByteArray_method_bswap64:
  244. .. rst-class:: classref-method
  245. |void| **bswap64**\ (\ offset\: :ref:`int<class_int>` = 0, count\: :ref:`int<class_int>` = -1\ ) :ref:`🔗<class_PackedByteArray_method_bswap64>`
  246. Swaps the byte order of ``count`` 64-bit segments of the array starting at ``offset``. Swap is done in-place. If ``count`` is less than zero, all segments to the end of array are processed, if processed data size is not a multiple of 8, bytes after the last processed 64-bit segment are not modified.
  247. .. rst-class:: classref-item-separator
  248. ----
  249. .. _class_PackedByteArray_method_clear:
  250. .. rst-class:: classref-method
  251. |void| **clear**\ (\ ) :ref:`🔗<class_PackedByteArray_method_clear>`
  252. Clears the array. This is equivalent to using :ref:`resize()<class_PackedByteArray_method_resize>` with a size of ``0``.
  253. .. rst-class:: classref-item-separator
  254. ----
  255. .. _class_PackedByteArray_method_compress:
  256. .. rst-class:: classref-method
  257. :ref:`PackedByteArray<class_PackedByteArray>` **compress**\ (\ compression_mode\: :ref:`int<class_int>` = 0\ ) |const| :ref:`🔗<class_PackedByteArray_method_compress>`
  258. Returns a new **PackedByteArray** with the data compressed. Set the compression mode using one of :ref:`CompressionMode<enum_FileAccess_CompressionMode>`'s constants.
  259. .. rst-class:: classref-item-separator
  260. ----
  261. .. _class_PackedByteArray_method_count:
  262. .. rst-class:: classref-method
  263. :ref:`int<class_int>` **count**\ (\ value\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_PackedByteArray_method_count>`
  264. Returns the number of times an element is in the array.
  265. .. rst-class:: classref-item-separator
  266. ----
  267. .. _class_PackedByteArray_method_decode_double:
  268. .. rst-class:: classref-method
  269. :ref:`float<class_float>` **decode_double**\ (\ byte_offset\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_PackedByteArray_method_decode_double>`
  270. Decodes a 64-bit floating-point number from the bytes starting at ``byte_offset``. Fails if the byte count is insufficient. Returns ``0.0`` if a valid number can't be decoded.
  271. .. rst-class:: classref-item-separator
  272. ----
  273. .. _class_PackedByteArray_method_decode_float:
  274. .. rst-class:: classref-method
  275. :ref:`float<class_float>` **decode_float**\ (\ byte_offset\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_PackedByteArray_method_decode_float>`
  276. Decodes a 32-bit floating-point number from the bytes starting at ``byte_offset``. Fails if the byte count is insufficient. Returns ``0.0`` if a valid number can't be decoded.
  277. .. rst-class:: classref-item-separator
  278. ----
  279. .. _class_PackedByteArray_method_decode_half:
  280. .. rst-class:: classref-method
  281. :ref:`float<class_float>` **decode_half**\ (\ byte_offset\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_PackedByteArray_method_decode_half>`
  282. Decodes a 16-bit floating-point number from the bytes starting at ``byte_offset``. Fails if the byte count is insufficient. Returns ``0.0`` if a valid number can't be decoded.
  283. .. rst-class:: classref-item-separator
  284. ----
  285. .. _class_PackedByteArray_method_decode_s8:
  286. .. rst-class:: classref-method
  287. :ref:`int<class_int>` **decode_s8**\ (\ byte_offset\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_PackedByteArray_method_decode_s8>`
  288. Decodes a 8-bit signed integer number from the bytes starting at ``byte_offset``. Fails if the byte count is insufficient. Returns ``0`` if a valid number can't be decoded.
  289. .. rst-class:: classref-item-separator
  290. ----
  291. .. _class_PackedByteArray_method_decode_s16:
  292. .. rst-class:: classref-method
  293. :ref:`int<class_int>` **decode_s16**\ (\ byte_offset\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_PackedByteArray_method_decode_s16>`
  294. Decodes a 16-bit signed integer number from the bytes starting at ``byte_offset``. Fails if the byte count is insufficient. Returns ``0`` if a valid number can't be decoded.
  295. .. rst-class:: classref-item-separator
  296. ----
  297. .. _class_PackedByteArray_method_decode_s32:
  298. .. rst-class:: classref-method
  299. :ref:`int<class_int>` **decode_s32**\ (\ byte_offset\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_PackedByteArray_method_decode_s32>`
  300. Decodes a 32-bit signed integer number from the bytes starting at ``byte_offset``. Fails if the byte count is insufficient. Returns ``0`` if a valid number can't be decoded.
  301. .. rst-class:: classref-item-separator
  302. ----
  303. .. _class_PackedByteArray_method_decode_s64:
  304. .. rst-class:: classref-method
  305. :ref:`int<class_int>` **decode_s64**\ (\ byte_offset\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_PackedByteArray_method_decode_s64>`
  306. Decodes a 64-bit signed integer number from the bytes starting at ``byte_offset``. Fails if the byte count is insufficient. Returns ``0`` if a valid number can't be decoded.
  307. .. rst-class:: classref-item-separator
  308. ----
  309. .. _class_PackedByteArray_method_decode_u8:
  310. .. rst-class:: classref-method
  311. :ref:`int<class_int>` **decode_u8**\ (\ byte_offset\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_PackedByteArray_method_decode_u8>`
  312. Decodes a 8-bit unsigned integer number from the bytes starting at ``byte_offset``. Fails if the byte count is insufficient. Returns ``0`` if a valid number can't be decoded.
  313. .. rst-class:: classref-item-separator
  314. ----
  315. .. _class_PackedByteArray_method_decode_u16:
  316. .. rst-class:: classref-method
  317. :ref:`int<class_int>` **decode_u16**\ (\ byte_offset\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_PackedByteArray_method_decode_u16>`
  318. Decodes a 16-bit unsigned integer number from the bytes starting at ``byte_offset``. Fails if the byte count is insufficient. Returns ``0`` if a valid number can't be decoded.
  319. .. rst-class:: classref-item-separator
  320. ----
  321. .. _class_PackedByteArray_method_decode_u32:
  322. .. rst-class:: classref-method
  323. :ref:`int<class_int>` **decode_u32**\ (\ byte_offset\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_PackedByteArray_method_decode_u32>`
  324. Decodes a 32-bit unsigned integer number from the bytes starting at ``byte_offset``. Fails if the byte count is insufficient. Returns ``0`` if a valid number can't be decoded.
  325. .. rst-class:: classref-item-separator
  326. ----
  327. .. _class_PackedByteArray_method_decode_u64:
  328. .. rst-class:: classref-method
  329. :ref:`int<class_int>` **decode_u64**\ (\ byte_offset\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_PackedByteArray_method_decode_u64>`
  330. Decodes a 64-bit unsigned integer number from the bytes starting at ``byte_offset``. Fails if the byte count is insufficient. Returns ``0`` if a valid number can't be decoded.
  331. .. rst-class:: classref-item-separator
  332. ----
  333. .. _class_PackedByteArray_method_decode_var:
  334. .. rst-class:: classref-method
  335. :ref:`Variant<class_Variant>` **decode_var**\ (\ byte_offset\: :ref:`int<class_int>`, allow_objects\: :ref:`bool<class_bool>` = false\ ) |const| :ref:`🔗<class_PackedByteArray_method_decode_var>`
  336. Decodes a :ref:`Variant<class_Variant>` from the bytes starting at ``byte_offset``. Returns ``null`` if a valid variant can't be decoded or the value is :ref:`Object<class_Object>`-derived and ``allow_objects`` is ``false``.
  337. .. rst-class:: classref-item-separator
  338. ----
  339. .. _class_PackedByteArray_method_decode_var_size:
  340. .. rst-class:: classref-method
  341. :ref:`int<class_int>` **decode_var_size**\ (\ byte_offset\: :ref:`int<class_int>`, allow_objects\: :ref:`bool<class_bool>` = false\ ) |const| :ref:`🔗<class_PackedByteArray_method_decode_var_size>`
  342. Decodes a size of a :ref:`Variant<class_Variant>` from the bytes starting at ``byte_offset``. Requires at least 4 bytes of data starting at the offset, otherwise fails.
  343. .. rst-class:: classref-item-separator
  344. ----
  345. .. _class_PackedByteArray_method_decompress:
  346. .. rst-class:: classref-method
  347. :ref:`PackedByteArray<class_PackedByteArray>` **decompress**\ (\ buffer_size\: :ref:`int<class_int>`, compression_mode\: :ref:`int<class_int>` = 0\ ) |const| :ref:`🔗<class_PackedByteArray_method_decompress>`
  348. Returns a new **PackedByteArray** with the data decompressed. Set ``buffer_size`` to the size of the uncompressed data. Set the compression mode using one of :ref:`CompressionMode<enum_FileAccess_CompressionMode>`'s constants.
  349. \ **Note:** Decompression is not guaranteed to work with data not compressed by Godot, for example if data compressed with the deflate compression mode lacks a checksum or header.
  350. .. rst-class:: classref-item-separator
  351. ----
  352. .. _class_PackedByteArray_method_decompress_dynamic:
  353. .. rst-class:: classref-method
  354. :ref:`PackedByteArray<class_PackedByteArray>` **decompress_dynamic**\ (\ max_output_size\: :ref:`int<class_int>`, compression_mode\: :ref:`int<class_int>` = 0\ ) |const| :ref:`🔗<class_PackedByteArray_method_decompress_dynamic>`
  355. Returns a new **PackedByteArray** with the data decompressed. Set the compression mode using one of :ref:`CompressionMode<enum_FileAccess_CompressionMode>`'s constants. **This method only accepts brotli, gzip, and deflate compression modes.**\
  356. This method is potentially slower than :ref:`decompress()<class_PackedByteArray_method_decompress>`, as it may have to re-allocate its output buffer multiple times while decompressing, whereas :ref:`decompress()<class_PackedByteArray_method_decompress>` knows it's output buffer size from the beginning.
  357. GZIP has a maximal compression ratio of 1032:1, meaning it's very possible for a small compressed payload to decompress to a potentially very large output. To guard against this, you may provide a maximum size this function is allowed to allocate in bytes via ``max_output_size``. Passing -1 will allow for unbounded output. If any positive value is passed, and the decompression exceeds that amount in bytes, then an error will be returned.
  358. \ **Note:** Decompression is not guaranteed to work with data not compressed by Godot, for example if data compressed with the deflate compression mode lacks a checksum or header.
  359. .. rst-class:: classref-item-separator
  360. ----
  361. .. _class_PackedByteArray_method_duplicate:
  362. .. rst-class:: classref-method
  363. :ref:`PackedByteArray<class_PackedByteArray>` **duplicate**\ (\ ) :ref:`🔗<class_PackedByteArray_method_duplicate>`
  364. Creates a copy of the array, and returns it.
  365. .. rst-class:: classref-item-separator
  366. ----
  367. .. _class_PackedByteArray_method_encode_double:
  368. .. rst-class:: classref-method
  369. |void| **encode_double**\ (\ byte_offset\: :ref:`int<class_int>`, value\: :ref:`float<class_float>`\ ) :ref:`🔗<class_PackedByteArray_method_encode_double>`
  370. Encodes a 64-bit floating-point number as bytes at the index of ``byte_offset`` bytes. The array must have at least 8 bytes of allocated space, starting at the offset.
  371. .. rst-class:: classref-item-separator
  372. ----
  373. .. _class_PackedByteArray_method_encode_float:
  374. .. rst-class:: classref-method
  375. |void| **encode_float**\ (\ byte_offset\: :ref:`int<class_int>`, value\: :ref:`float<class_float>`\ ) :ref:`🔗<class_PackedByteArray_method_encode_float>`
  376. Encodes a 32-bit floating-point number as bytes at the index of ``byte_offset`` bytes. The array must have at least 4 bytes of space, starting at the offset.
  377. .. rst-class:: classref-item-separator
  378. ----
  379. .. _class_PackedByteArray_method_encode_half:
  380. .. rst-class:: classref-method
  381. |void| **encode_half**\ (\ byte_offset\: :ref:`int<class_int>`, value\: :ref:`float<class_float>`\ ) :ref:`🔗<class_PackedByteArray_method_encode_half>`
  382. Encodes a 16-bit floating-point number as bytes at the index of ``byte_offset`` bytes. The array must have at least 2 bytes of space, starting at the offset.
  383. .. rst-class:: classref-item-separator
  384. ----
  385. .. _class_PackedByteArray_method_encode_s8:
  386. .. rst-class:: classref-method
  387. |void| **encode_s8**\ (\ byte_offset\: :ref:`int<class_int>`, value\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PackedByteArray_method_encode_s8>`
  388. Encodes a 8-bit signed integer number (signed byte) at the index of ``byte_offset`` bytes. The array must have at least 1 byte of space, starting at the offset.
  389. .. rst-class:: classref-item-separator
  390. ----
  391. .. _class_PackedByteArray_method_encode_s16:
  392. .. rst-class:: classref-method
  393. |void| **encode_s16**\ (\ byte_offset\: :ref:`int<class_int>`, value\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PackedByteArray_method_encode_s16>`
  394. Encodes a 16-bit signed integer number as bytes at the index of ``byte_offset`` bytes. The array must have at least 2 bytes of space, starting at the offset.
  395. .. rst-class:: classref-item-separator
  396. ----
  397. .. _class_PackedByteArray_method_encode_s32:
  398. .. rst-class:: classref-method
  399. |void| **encode_s32**\ (\ byte_offset\: :ref:`int<class_int>`, value\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PackedByteArray_method_encode_s32>`
  400. Encodes a 32-bit signed integer number as bytes at the index of ``byte_offset`` bytes. The array must have at least 4 bytes of space, starting at the offset.
  401. .. rst-class:: classref-item-separator
  402. ----
  403. .. _class_PackedByteArray_method_encode_s64:
  404. .. rst-class:: classref-method
  405. |void| **encode_s64**\ (\ byte_offset\: :ref:`int<class_int>`, value\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PackedByteArray_method_encode_s64>`
  406. Encodes a 64-bit signed integer number as bytes at the index of ``byte_offset`` bytes. The array must have at least 8 bytes of space, starting at the offset.
  407. .. rst-class:: classref-item-separator
  408. ----
  409. .. _class_PackedByteArray_method_encode_u8:
  410. .. rst-class:: classref-method
  411. |void| **encode_u8**\ (\ byte_offset\: :ref:`int<class_int>`, value\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PackedByteArray_method_encode_u8>`
  412. Encodes a 8-bit unsigned integer number (byte) at the index of ``byte_offset`` bytes. The array must have at least 1 byte of space, starting at the offset.
  413. .. rst-class:: classref-item-separator
  414. ----
  415. .. _class_PackedByteArray_method_encode_u16:
  416. .. rst-class:: classref-method
  417. |void| **encode_u16**\ (\ byte_offset\: :ref:`int<class_int>`, value\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PackedByteArray_method_encode_u16>`
  418. Encodes a 16-bit unsigned integer number as bytes at the index of ``byte_offset`` bytes. The array must have at least 2 bytes of space, starting at the offset.
  419. .. rst-class:: classref-item-separator
  420. ----
  421. .. _class_PackedByteArray_method_encode_u32:
  422. .. rst-class:: classref-method
  423. |void| **encode_u32**\ (\ byte_offset\: :ref:`int<class_int>`, value\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PackedByteArray_method_encode_u32>`
  424. Encodes a 32-bit unsigned integer number as bytes at the index of ``byte_offset`` bytes. The array must have at least 4 bytes of space, starting at the offset.
  425. .. rst-class:: classref-item-separator
  426. ----
  427. .. _class_PackedByteArray_method_encode_u64:
  428. .. rst-class:: classref-method
  429. |void| **encode_u64**\ (\ byte_offset\: :ref:`int<class_int>`, value\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PackedByteArray_method_encode_u64>`
  430. Encodes a 64-bit unsigned integer number as bytes at the index of ``byte_offset`` bytes. The array must have at least 8 bytes of space, starting at the offset.
  431. .. rst-class:: classref-item-separator
  432. ----
  433. .. _class_PackedByteArray_method_encode_var:
  434. .. rst-class:: classref-method
  435. :ref:`int<class_int>` **encode_var**\ (\ byte_offset\: :ref:`int<class_int>`, value\: :ref:`Variant<class_Variant>`, allow_objects\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_PackedByteArray_method_encode_var>`
  436. Encodes a :ref:`Variant<class_Variant>` at the index of ``byte_offset`` bytes. A sufficient space must be allocated, depending on the encoded variant's size. If ``allow_objects`` is ``false``, :ref:`Object<class_Object>`-derived values are not permitted and will instead be serialized as ID-only.
  437. .. rst-class:: classref-item-separator
  438. ----
  439. .. _class_PackedByteArray_method_erase:
  440. .. rst-class:: classref-method
  441. :ref:`bool<class_bool>` **erase**\ (\ value\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PackedByteArray_method_erase>`
  442. Removes the first occurrence of a value from the array and returns ``true``. If the value does not exist in the array, nothing happens and ``false`` is returned. To remove an element by index, use :ref:`remove_at()<class_PackedByteArray_method_remove_at>` instead.
  443. .. rst-class:: classref-item-separator
  444. ----
  445. .. _class_PackedByteArray_method_fill:
  446. .. rst-class:: classref-method
  447. |void| **fill**\ (\ value\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PackedByteArray_method_fill>`
  448. Assigns the given value to all elements in the array. This can typically be used together with :ref:`resize()<class_PackedByteArray_method_resize>` to create an array with a given size and initialized elements.
  449. .. rst-class:: classref-item-separator
  450. ----
  451. .. _class_PackedByteArray_method_find:
  452. .. rst-class:: classref-method
  453. :ref:`int<class_int>` **find**\ (\ value\: :ref:`int<class_int>`, from\: :ref:`int<class_int>` = 0\ ) |const| :ref:`🔗<class_PackedByteArray_method_find>`
  454. Searches the array for a value and returns its index or ``-1`` if not found. Optionally, the initial search index can be passed.
  455. .. rst-class:: classref-item-separator
  456. ----
  457. .. _class_PackedByteArray_method_get:
  458. .. rst-class:: classref-method
  459. :ref:`int<class_int>` **get**\ (\ index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_PackedByteArray_method_get>`
  460. Returns the byte at the given ``index`` in the array. If ``index`` out-of-bounds or negative, this method fails and returns ``0``.
  461. This method is similar (but not identical) to the ``[]`` operator. Most notably, when this method fails, it doesn't pause project execution if run from the editor.
  462. .. rst-class:: classref-item-separator
  463. ----
  464. .. _class_PackedByteArray_method_get_string_from_ascii:
  465. .. rst-class:: classref-method
  466. :ref:`String<class_String>` **get_string_from_ascii**\ (\ ) |const| :ref:`🔗<class_PackedByteArray_method_get_string_from_ascii>`
  467. Converts ASCII/Latin-1 encoded array to :ref:`String<class_String>`. Fast alternative to :ref:`get_string_from_utf8()<class_PackedByteArray_method_get_string_from_utf8>` if the content is ASCII/Latin-1 only. Unlike the UTF-8 function this function maps every byte to a character in the array. Multibyte sequences will not be interpreted correctly. For parsing user input always use :ref:`get_string_from_utf8()<class_PackedByteArray_method_get_string_from_utf8>`. This is the inverse of :ref:`String.to_ascii_buffer()<class_String_method_to_ascii_buffer>`.
  468. .. rst-class:: classref-item-separator
  469. ----
  470. .. _class_PackedByteArray_method_get_string_from_multibyte_char:
  471. .. rst-class:: classref-method
  472. :ref:`String<class_String>` **get_string_from_multibyte_char**\ (\ encoding\: :ref:`String<class_String>` = ""\ ) |const| :ref:`🔗<class_PackedByteArray_method_get_string_from_multibyte_char>`
  473. Converts system multibyte code page encoded array to :ref:`String<class_String>`. If conversion fails, empty string is returned. This is the inverse of :ref:`String.to_multibyte_char_buffer()<class_String_method_to_multibyte_char_buffer>`.
  474. The values permitted for ``encoding`` are system dependent. If ``encoding`` is empty string, system default encoding is used.
  475. - For Windows, see `Code Page Identifiers <https://learn.microsoft.com/en-us/windows/win32/Intl/code-page-identifiers>`__ .NET names.
  476. - For macOS and Linux/BSD, see ``libiconv`` library documentation and ``iconv --list`` for a list of supported encodings.
  477. .. rst-class:: classref-item-separator
  478. ----
  479. .. _class_PackedByteArray_method_get_string_from_utf8:
  480. .. rst-class:: classref-method
  481. :ref:`String<class_String>` **get_string_from_utf8**\ (\ ) |const| :ref:`🔗<class_PackedByteArray_method_get_string_from_utf8>`
  482. Converts UTF-8 encoded array to :ref:`String<class_String>`. Slower than :ref:`get_string_from_ascii()<class_PackedByteArray_method_get_string_from_ascii>` but supports UTF-8 encoded data. Use this function if you are unsure about the source of the data. For user input this function should always be preferred. Returns empty string if source array is not valid UTF-8 string. This is the inverse of :ref:`String.to_utf8_buffer()<class_String_method_to_utf8_buffer>`.
  483. .. rst-class:: classref-item-separator
  484. ----
  485. .. _class_PackedByteArray_method_get_string_from_utf16:
  486. .. rst-class:: classref-method
  487. :ref:`String<class_String>` **get_string_from_utf16**\ (\ ) |const| :ref:`🔗<class_PackedByteArray_method_get_string_from_utf16>`
  488. Converts UTF-16 encoded array to :ref:`String<class_String>`. If the BOM is missing, little-endianness is assumed. Returns empty string if source array is not valid UTF-16 string. This is the inverse of :ref:`String.to_utf16_buffer()<class_String_method_to_utf16_buffer>`.
  489. .. rst-class:: classref-item-separator
  490. ----
  491. .. _class_PackedByteArray_method_get_string_from_utf32:
  492. .. rst-class:: classref-method
  493. :ref:`String<class_String>` **get_string_from_utf32**\ (\ ) |const| :ref:`🔗<class_PackedByteArray_method_get_string_from_utf32>`
  494. Converts UTF-32 encoded array to :ref:`String<class_String>`. Returns empty string if source array is not valid UTF-32 string. This is the inverse of :ref:`String.to_utf32_buffer()<class_String_method_to_utf32_buffer>`.
  495. .. rst-class:: classref-item-separator
  496. ----
  497. .. _class_PackedByteArray_method_get_string_from_wchar:
  498. .. rst-class:: classref-method
  499. :ref:`String<class_String>` **get_string_from_wchar**\ (\ ) |const| :ref:`🔗<class_PackedByteArray_method_get_string_from_wchar>`
  500. Converts wide character (``wchar_t``, UTF-16 on Windows, UTF-32 on other platforms) encoded array to :ref:`String<class_String>`. Returns empty string if source array is not valid wide string. This is the inverse of :ref:`String.to_wchar_buffer()<class_String_method_to_wchar_buffer>`.
  501. .. rst-class:: classref-item-separator
  502. ----
  503. .. _class_PackedByteArray_method_has:
  504. .. rst-class:: classref-method
  505. :ref:`bool<class_bool>` **has**\ (\ value\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_PackedByteArray_method_has>`
  506. Returns ``true`` if the array contains ``value``.
  507. .. rst-class:: classref-item-separator
  508. ----
  509. .. _class_PackedByteArray_method_has_encoded_var:
  510. .. rst-class:: classref-method
  511. :ref:`bool<class_bool>` **has_encoded_var**\ (\ byte_offset\: :ref:`int<class_int>`, allow_objects\: :ref:`bool<class_bool>` = false\ ) |const| :ref:`🔗<class_PackedByteArray_method_has_encoded_var>`
  512. Returns ``true`` if a valid :ref:`Variant<class_Variant>` value can be decoded at the ``byte_offset``. Returns ``false`` otherwise or when the value is :ref:`Object<class_Object>`-derived and ``allow_objects`` is ``false``.
  513. .. rst-class:: classref-item-separator
  514. ----
  515. .. _class_PackedByteArray_method_hex_encode:
  516. .. rst-class:: classref-method
  517. :ref:`String<class_String>` **hex_encode**\ (\ ) |const| :ref:`🔗<class_PackedByteArray_method_hex_encode>`
  518. Returns a hexadecimal representation of this array as a :ref:`String<class_String>`.
  519. .. tabs::
  520. .. code-tab:: gdscript
  521. var array = PackedByteArray([11, 46, 255])
  522. print(array.hex_encode()) # Prints "0b2eff"
  523. .. code-tab:: csharp
  524. byte[] array = [11, 46, 255];
  525. GD.Print(array.HexEncode()); // Prints "0b2eff"
  526. .. rst-class:: classref-item-separator
  527. ----
  528. .. _class_PackedByteArray_method_insert:
  529. .. rst-class:: classref-method
  530. :ref:`int<class_int>` **insert**\ (\ at_index\: :ref:`int<class_int>`, value\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PackedByteArray_method_insert>`
  531. Inserts a new element at a given position in the array. The position must be valid, or at the end of the array (``idx == size()``).
  532. .. rst-class:: classref-item-separator
  533. ----
  534. .. _class_PackedByteArray_method_is_empty:
  535. .. rst-class:: classref-method
  536. :ref:`bool<class_bool>` **is_empty**\ (\ ) |const| :ref:`🔗<class_PackedByteArray_method_is_empty>`
  537. Returns ``true`` if the array is empty.
  538. .. rst-class:: classref-item-separator
  539. ----
  540. .. _class_PackedByteArray_method_push_back:
  541. .. rst-class:: classref-method
  542. :ref:`bool<class_bool>` **push_back**\ (\ value\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PackedByteArray_method_push_back>`
  543. Appends an element at the end of the array.
  544. .. rst-class:: classref-item-separator
  545. ----
  546. .. _class_PackedByteArray_method_remove_at:
  547. .. rst-class:: classref-method
  548. |void| **remove_at**\ (\ index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PackedByteArray_method_remove_at>`
  549. Removes an element from the array by index.
  550. .. rst-class:: classref-item-separator
  551. ----
  552. .. _class_PackedByteArray_method_resize:
  553. .. rst-class:: classref-method
  554. :ref:`int<class_int>` **resize**\ (\ new_size\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PackedByteArray_method_resize>`
  555. Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size. Calling :ref:`resize()<class_PackedByteArray_method_resize>` once and assigning the new values is faster than adding new elements one by one.
  556. Returns :ref:`@GlobalScope.OK<class_@GlobalScope_constant_OK>` on success, or one of the following :ref:`Error<enum_@GlobalScope_Error>` constants if this method fails: :ref:`@GlobalScope.ERR_INVALID_PARAMETER<class_@GlobalScope_constant_ERR_INVALID_PARAMETER>` if the size is negative, or :ref:`@GlobalScope.ERR_OUT_OF_MEMORY<class_@GlobalScope_constant_ERR_OUT_OF_MEMORY>` if allocations fail. Use :ref:`size()<class_PackedByteArray_method_size>` to find the actual size of the array after resize.
  557. .. rst-class:: classref-item-separator
  558. ----
  559. .. _class_PackedByteArray_method_reverse:
  560. .. rst-class:: classref-method
  561. |void| **reverse**\ (\ ) :ref:`🔗<class_PackedByteArray_method_reverse>`
  562. Reverses the order of the elements in the array.
  563. .. rst-class:: classref-item-separator
  564. ----
  565. .. _class_PackedByteArray_method_rfind:
  566. .. rst-class:: classref-method
  567. :ref:`int<class_int>` **rfind**\ (\ value\: :ref:`int<class_int>`, from\: :ref:`int<class_int>` = -1\ ) |const| :ref:`🔗<class_PackedByteArray_method_rfind>`
  568. Searches the array in reverse order. Optionally, a start search index can be passed. If negative, the start index is considered relative to the end of the array.
  569. .. rst-class:: classref-item-separator
  570. ----
  571. .. _class_PackedByteArray_method_set:
  572. .. rst-class:: classref-method
  573. |void| **set**\ (\ index\: :ref:`int<class_int>`, value\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PackedByteArray_method_set>`
  574. Changes the byte at the given index.
  575. .. rst-class:: classref-item-separator
  576. ----
  577. .. _class_PackedByteArray_method_size:
  578. .. rst-class:: classref-method
  579. :ref:`int<class_int>` **size**\ (\ ) |const| :ref:`🔗<class_PackedByteArray_method_size>`
  580. Returns the number of elements in the array.
  581. .. rst-class:: classref-item-separator
  582. ----
  583. .. _class_PackedByteArray_method_slice:
  584. .. rst-class:: classref-method
  585. :ref:`PackedByteArray<class_PackedByteArray>` **slice**\ (\ begin\: :ref:`int<class_int>`, end\: :ref:`int<class_int>` = 2147483647\ ) |const| :ref:`🔗<class_PackedByteArray_method_slice>`
  586. Returns the slice of the **PackedByteArray**, from ``begin`` (inclusive) to ``end`` (exclusive), as a new **PackedByteArray**.
  587. The absolute value of ``begin`` and ``end`` will be clamped to the array size, so the default value for ``end`` makes it slice to the size of the array by default (i.e. ``arr.slice(1)`` is a shorthand for ``arr.slice(1, arr.size())``).
  588. If either ``begin`` or ``end`` are negative, they will be relative to the end of the array (i.e. ``arr.slice(0, -2)`` is a shorthand for ``arr.slice(0, arr.size() - 2)``).
  589. .. rst-class:: classref-item-separator
  590. ----
  591. .. _class_PackedByteArray_method_sort:
  592. .. rst-class:: classref-method
  593. |void| **sort**\ (\ ) :ref:`🔗<class_PackedByteArray_method_sort>`
  594. Sorts the elements of the array in ascending order.
  595. .. rst-class:: classref-item-separator
  596. ----
  597. .. _class_PackedByteArray_method_to_color_array:
  598. .. rst-class:: classref-method
  599. :ref:`PackedColorArray<class_PackedColorArray>` **to_color_array**\ (\ ) |const| :ref:`🔗<class_PackedByteArray_method_to_color_array>`
  600. Returns a copy of the data converted to a :ref:`PackedColorArray<class_PackedColorArray>`, where each block of 16 bytes has been converted to a :ref:`Color<class_Color>` variant.
  601. \ **Note:** The size of the input array must be a multiple of 16 (size of four 32-bit float variables). The size of the new array will be ``byte_array.size() / 16``. If the original data can't be converted to :ref:`Color<class_Color>` variants, the resulting data is undefined.
  602. .. rst-class:: classref-item-separator
  603. ----
  604. .. _class_PackedByteArray_method_to_float32_array:
  605. .. rst-class:: classref-method
  606. :ref:`PackedFloat32Array<class_PackedFloat32Array>` **to_float32_array**\ (\ ) |const| :ref:`🔗<class_PackedByteArray_method_to_float32_array>`
  607. Returns a copy of the data converted to a :ref:`PackedFloat32Array<class_PackedFloat32Array>`, where each block of 4 bytes has been converted to a 32-bit float (C++ ``float``).
  608. The size of the input array must be a multiple of 4 (size of 32-bit float). The size of the new array will be ``byte_array.size() / 4``.
  609. If the original data can't be converted to 32-bit floats, the resulting data is undefined.
  610. .. rst-class:: classref-item-separator
  611. ----
  612. .. _class_PackedByteArray_method_to_float64_array:
  613. .. rst-class:: classref-method
  614. :ref:`PackedFloat64Array<class_PackedFloat64Array>` **to_float64_array**\ (\ ) |const| :ref:`🔗<class_PackedByteArray_method_to_float64_array>`
  615. Returns a copy of the data converted to a :ref:`PackedFloat64Array<class_PackedFloat64Array>`, where each block of 8 bytes has been converted to a 64-bit float (C++ ``double``, Godot :ref:`float<class_float>`).
  616. The size of the input array must be a multiple of 8 (size of 64-bit double). The size of the new array will be ``byte_array.size() / 8``.
  617. If the original data can't be converted to 64-bit floats, the resulting data is undefined.
  618. .. rst-class:: classref-item-separator
  619. ----
  620. .. _class_PackedByteArray_method_to_int32_array:
  621. .. rst-class:: classref-method
  622. :ref:`PackedInt32Array<class_PackedInt32Array>` **to_int32_array**\ (\ ) |const| :ref:`🔗<class_PackedByteArray_method_to_int32_array>`
  623. Returns a copy of the data converted to a :ref:`PackedInt32Array<class_PackedInt32Array>`, where each block of 4 bytes has been converted to a signed 32-bit integer (C++ ``int32_t``).
  624. The size of the input array must be a multiple of 4 (size of 32-bit integer). The size of the new array will be ``byte_array.size() / 4``.
  625. If the original data can't be converted to signed 32-bit integers, the resulting data is undefined.
  626. .. rst-class:: classref-item-separator
  627. ----
  628. .. _class_PackedByteArray_method_to_int64_array:
  629. .. rst-class:: classref-method
  630. :ref:`PackedInt64Array<class_PackedInt64Array>` **to_int64_array**\ (\ ) |const| :ref:`🔗<class_PackedByteArray_method_to_int64_array>`
  631. Returns a copy of the data converted to a :ref:`PackedInt64Array<class_PackedInt64Array>`, where each block of 8 bytes has been converted to a signed 64-bit integer (C++ ``int64_t``, Godot :ref:`int<class_int>`).
  632. The size of the input array must be a multiple of 8 (size of 64-bit integer). The size of the new array will be ``byte_array.size() / 8``.
  633. If the original data can't be converted to signed 64-bit integers, the resulting data is undefined.
  634. .. rst-class:: classref-item-separator
  635. ----
  636. .. _class_PackedByteArray_method_to_vector2_array:
  637. .. rst-class:: classref-method
  638. :ref:`PackedVector2Array<class_PackedVector2Array>` **to_vector2_array**\ (\ ) |const| :ref:`🔗<class_PackedByteArray_method_to_vector2_array>`
  639. Returns a copy of the data converted to a :ref:`PackedVector2Array<class_PackedVector2Array>`, where each block of 8 bytes or 16 bytes (32-bit or 64-bit) has been converted to a :ref:`Vector2<class_Vector2>` variant.
  640. \ **Note:** The size of the input array must be a multiple of 8 or 16 (depending on the build settings, see :ref:`Vector2<class_Vector2>` for more details). The size of the new array will be ``byte_array.size() / (8 or 16)``. If the original data can't be converted to :ref:`Vector2<class_Vector2>` variants, the resulting data is undefined.
  641. .. rst-class:: classref-item-separator
  642. ----
  643. .. _class_PackedByteArray_method_to_vector3_array:
  644. .. rst-class:: classref-method
  645. :ref:`PackedVector3Array<class_PackedVector3Array>` **to_vector3_array**\ (\ ) |const| :ref:`🔗<class_PackedByteArray_method_to_vector3_array>`
  646. Returns a copy of the data converted to a :ref:`PackedVector3Array<class_PackedVector3Array>`, where each block of 12 or 24 bytes (32-bit or 64-bit) has been converted to a :ref:`Vector3<class_Vector3>` variant.
  647. \ **Note:** The size of the input array must be a multiple of 12 or 24 (depending on the build settings, see :ref:`Vector3<class_Vector3>` for more details). The size of the new array will be ``byte_array.size() / (12 or 24)``. If the original data can't be converted to :ref:`Vector3<class_Vector3>` variants, the resulting data is undefined.
  648. .. rst-class:: classref-item-separator
  649. ----
  650. .. _class_PackedByteArray_method_to_vector4_array:
  651. .. rst-class:: classref-method
  652. :ref:`PackedVector4Array<class_PackedVector4Array>` **to_vector4_array**\ (\ ) |const| :ref:`🔗<class_PackedByteArray_method_to_vector4_array>`
  653. Returns a copy of the data converted to a :ref:`PackedVector4Array<class_PackedVector4Array>`, where each block of 16 or 32 bytes (32-bit or 64-bit) has been converted to a :ref:`Vector4<class_Vector4>` variant.
  654. \ **Note:** The size of the input array must be a multiple of 16 or 32 (depending on the build settings, see :ref:`Vector4<class_Vector4>` for more details). The size of the new array will be ``byte_array.size() / (16 or 32)``. If the original data can't be converted to :ref:`Vector4<class_Vector4>` variants, the resulting data is undefined.
  655. .. rst-class:: classref-section-separator
  656. ----
  657. .. rst-class:: classref-descriptions-group
  658. Operator Descriptions
  659. ---------------------
  660. .. _class_PackedByteArray_operator_neq_PackedByteArray:
  661. .. rst-class:: classref-operator
  662. :ref:`bool<class_bool>` **operator !=**\ (\ right\: :ref:`PackedByteArray<class_PackedByteArray>`\ ) :ref:`🔗<class_PackedByteArray_operator_neq_PackedByteArray>`
  663. Returns ``true`` if contents of the arrays differ.
  664. .. rst-class:: classref-item-separator
  665. ----
  666. .. _class_PackedByteArray_operator_sum_PackedByteArray:
  667. .. rst-class:: classref-operator
  668. :ref:`PackedByteArray<class_PackedByteArray>` **operator +**\ (\ right\: :ref:`PackedByteArray<class_PackedByteArray>`\ ) :ref:`🔗<class_PackedByteArray_operator_sum_PackedByteArray>`
  669. Returns a new **PackedByteArray** with contents of ``right`` added at the end of this array. For better performance, consider using :ref:`append_array()<class_PackedByteArray_method_append_array>` instead.
  670. .. rst-class:: classref-item-separator
  671. ----
  672. .. _class_PackedByteArray_operator_eq_PackedByteArray:
  673. .. rst-class:: classref-operator
  674. :ref:`bool<class_bool>` **operator ==**\ (\ right\: :ref:`PackedByteArray<class_PackedByteArray>`\ ) :ref:`🔗<class_PackedByteArray_operator_eq_PackedByteArray>`
  675. Returns ``true`` if contents of both arrays are the same, i.e. they have all equal bytes at the corresponding indices.
  676. .. rst-class:: classref-item-separator
  677. ----
  678. .. _class_PackedByteArray_operator_idx_int:
  679. .. rst-class:: classref-operator
  680. :ref:`int<class_int>` **operator []**\ (\ index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PackedByteArray_operator_idx_int>`
  681. Returns the byte at index ``index``. Negative indices can be used to access the elements starting from the end. Using index out of array's bounds will result in an error.
  682. Note that the byte is returned as a 64-bit :ref:`int<class_int>`.
  683. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  684. .. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
  685. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  686. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  687. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  688. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  689. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  690. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
  691. .. |void| replace:: :abbr:`void (No return value.)`