Advertisement
Guest User

Italian Translation Report: Node.js [Part 27 - 1056 words]

a guest
Aug 16th, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.96 KB | None | 0 0
  1. A value to pre-fill the new with.
  2. If is a string, this is its encoding.
  3. If is, the will be zero-filled
  4. If is specified, the allocated will be initialized by calling
  5. If both and are specified, the allocated will be initialized by calling
  6. Calling can be significantly slower than the alternative but ensures that the newly created instance contents will never contain sensitive data
  7. A will be thrown if is not a number.
  8. The underlying memory for instances created in this way is not initialized
  9. The contents of the newly created are unknown and may contain sensitive data
  10. Use instead to initialize instances with zeroes.
  11. Note that the module pre-allocates an internal instance of size that is used as a pool for the fast allocation of new instances created using and the deprecated constructor only when is less than or equal to (floor of divided by two).
  12. Use of this pre-allocated internal memory pool is a key difference between calling vs.
  13. Specifically, will never use the internal pool, while will use the internal pool if is less than or equal to half
  14. The difference is subtle but can be important when an application requires the additional performance that provides.
  15. Use to initialize such instances with zeroes.
  16. When using to allocate new instances, allocations under 4KB are sliced from a single pre-allocated
  17. This allows applications to avoid the garbage collection overhead of creating many individually allocated instances.
  18. This approach improves both performance and memory usage by eliminating the need to track and clean up as many persistent objects.
  19. However, in the case where a developer may need to retain a small chunk of memory from a pool for an indeterminate amount of time, it may be appropriate to create an un-pooled instance using and then copying out the relevant bits.
  20. Need to keep around a few small chunks of memory
  21. Allocate for retained data
  22. Copy the data into the new allocation
  23. should be used only as a last resort after a developer has observed undue memory retention in their applications.
  24. A value to calculate the length of.
  25. The number of bytes contained within
  26. Returns the actual byte length of a string.
  27. This is not the same as since that returns the number of characters in a string.
  28. For and, this function assumes valid input.
  29. For strings that contain encoded data (e.g. whitespace), the return value might be greater than the length of a created from the string.
  30. When is a, the actual byte length is returned.
  31. Compares to typically for the purpose of sorting arrays of instances.
  32. This is equivalent to calling
  33. List of or instances to concat.
  34. Total length of the instances in when concatenated.
  35. Returns a new which is the result of concatenating all the instances in the together.
  36. If the list has no items, or if the is 0, then a new zero-length is returned.
  37. If is not provided, it is calculated from the instances in
  38. This however causes an additional loop to be executed in order to calculate the, so it is faster to provide the length explicitly if it is already known.
  39. If is provided, it is coerced to an unsigned integer.
  40. If the combined length of the in exceeds, the result is truncated to
  41. // Create a single from a list of three instances.
  42. A will be thrown if is not an
  43. This creates a view of the without copying the underlying memory.
  44. For example, when passed a reference to the property of a instance, the newly created will share the same allocated memory as the
  45. A will be thrown if is not an or a
  46. A string to encode.
  47. An object supporting or
  48. A byte-offset or encoding, depending on the value returned either by or
  49. A length, depending on the value returned either by or
  50. For objects whose function returns a value not strictly equal to, returns
  51. For objects that support, returns
  52. Returns if is a, otherwise.
  53. A character encoding name to check.
  54. Returns if contains a supported character encoding, or otherwise
  55. This is the size (in bytes) of pre-allocated internal instances used for pooling.
  56. This value may be modified.
  57. The index operator can be used to get and set the octet at position in
  58. The values refer to individual bytes, so the legal value range is between and (hex) or and (decimal)
  59. This operator is inherited from, so its behavior on out-of-bounds access is the same as - that is, getting returns and setting does nothing.
  60. // Copy an ASCII string into a one byte at a time.
  61. The underlying object based on which this object is created.
  62. A or with which to compare
  63. The offset within at which to begin comparison.
  64. Compares with and returns a number indicating whether comes before, after, or is the same as in sort order.
  65. Comparison is based on the actual sequence of bytes in each
  66. is returned if is the same as
  67. is returned if should come before when sorted.
  68. The optional and, arguments can be used to limit the comparison to specific ranges within and respectively.
  69. is thrown if, or
  70. A or to copy into.
  71. The offset within at which to begin writing.
  72. The number of bytes copied.
  73. Copies data from a region of to a region in even if the memory region overlaps with
  74. // Create two `Buffer` instances.
  75. 97 is the decimal ASCII value for
  76. Copy bytes 16 through 19 into starting at byte 8 of
  77. // Create a and copy data from one region to an overlapping region within the same
  78. Creates and returns an iterator of pairs from the contents of
  79. // Log the entire contents of a
  80. Returns if both and have exactly the same bytes, otherwise.
  81. The value with which to fill
  82. Number of bytes to skip before starting to fill
  83. Where to stop filling (not inclusive).
  84. The encoding for if is a string.
  85. A reference to
  86. Fills with the specified
  87. If the and are not given, the entire will be filled:
  88. // Fill a with the ASCII character
  89. is coerced to a value if it is not a string or integer.
  90. If the final write of a operation falls on a multi-byte character, then only the bytes of that character that fit into are written:
  91. // Fill a with a two-byte character.
  92. If contains invalid characters, it is truncated; if no valid fill data remains, an exception is thrown:
  93. Throws an exception
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement