Skip to content

Commit 6daaa3a

Browse files
authored
Finish article.md
1 parent a0e9f0e commit 6daaa3a

1 file changed

Lines changed: 16 additions & 15 deletions

File tree

4-binary/01-arraybuffer-binary-arrays/article.md

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -245,27 +245,28 @@ dataView.setUint32(0, 0); // صفر قرار دادن یک عدد 4 بایتی،
245245

246246
هنگامی که می‌خواهیم داده‌هایی با فرمت‌های درهم و برهم را در یک بافر ذخیره کنیم، `DataView` عالی است. به عنوان مثال، هنگامی که دنباله‌ای از جفت‌های(عدد صحیح 16 بیتی، عدد اعشاری 32 بیتی) را ذخیره می‌کنیم، `DataView` به آسانی اجازه دسترسی به آن‌ها را می‌دهد.
247247

248-
## Summary
248+
## خلاصه
249249

250-
`ArrayBuffer` is the core object, a reference to the fixed-length contiguous memory area.
250+
یک `ArrayBuffer`، شی اصلی است، یک ارجاع به یک ناحیه پیوسته از حافظه با طول ثابت.
251251

252-
To do almost any operation on `ArrayBuffer`, we need a view.
252+
برای انجام تقریبا هر عملیاتی روی `ArrayBuffer`، ما به یک view نیاز داریم.
253253

254-
- It can be a `TypedArray`:
255-
- `Uint8Array`, `Uint16Array`, `Uint32Array` -- for unsigned integers of 8, 16, and 32 bits.
256-
- `Uint8ClampedArray` -- for 8-bit integers, "clamps" them on assignment.
257-
- `Int8Array`, `Int16Array`, `Int32Array` -- for signed integer numbers (can be negative).
258-
- `Float32Array`, `Float64Array` -- for signed floating-point numbers of 32 and 64 bits.
259-
- Or a `DataView` -- the view that uses methods to specify a format, e.g. `getUint8(offset)`.
254+
- این می‌تواند یک `TypedArray` باشد:
255+
- `Uint8Array`, `Uint16Array`, `Uint32Array` -- برای اعداد صحیح بدون عللامت 8 و 16 و 32 بیتی
256+
- `Uint8ClampedArray` -- می‌کند "clamps" برای اعداد صحیح 8 بیتی، آن‌ها را
257+
- `Int8Array`, `Int16Array`, `Int32Array` -- برای اعداد صحیح علامت‌دار(می‌توانند منفی باشند)
258+
- `Float32Array`, `Float64Array` -- برای اعداد اعشاری علامت‌دار 32 و 64 بیتی
259+
- یا یک `DataView` -- همان viewیی که از متدها برای مشخص کردن یک فرمت استفاده می‌کند، مانند `getUint8(offset)`
260260

261-
In most cases we create and operate directly on typed arrays, leaving `ArrayBuffer` under cover, as a "common denominator". We can access it as `.buffer` and make another view if needed.
261+
در بیشتر موارد، ما مستقیما آرایه‌های typed را می‌سازیم و اجرا می‌کنیم، `ArrayBuffer` را به عنوان یک "مخرج مشترک" تخت پوشش قرار می‌دهیم. می‌توانیم با `.buffer` به آن دسترسی پیدا کنیم و در صورت نیاز یک view دیگر ایجاد کنیم.
262262

263-
There are also two additional terms, that are used in descriptions of methods that operate on binary data:
264-
- `ArrayBufferView` is an umbrella term for all these kinds of views.
265-
- `BufferSource` is an umbrella term for `ArrayBuffer` or `ArrayBufferView`.
263+
دو اصطلاح اضافی نیز وجود دارد، که برای توصیف متدهایی که روی داده‌های دودویی عملیات انجام می‌دهند استفاده می‌شوند:
266264

267-
We'll see these terms in the next chapters. `BufferSource` is one of the most common terms, as it means "any kind of binary data" -- an `ArrayBuffer` or a view over it.
265+
- اصطلاح `ArrayBufferView`، از نوعی اصطلاح است که برای پوشش دسته‌ی گسترده‌ای از چیزها استفاده می‌شود، که در این مورد، برای تمام انواع viewها استفاده می‌شود.
268266

269-
Here's a cheatsheet:
267+
- اصطلاح `BufferSource`، از نوعی اصطلاح است که برای پوشش دسته‌ی گسترده‌ای از چیزها استفاده می‌شود، که در این مورد، برای `ArrayBuffer` یا `ArrayBufferView` استفاده می‌شود.
270268

269+
این اصطلاحات را در بخش بعد مشاهده خواهیم کرد. `BufferSource` یکی از رایج‌ترین اصطلاحات می‌باشد، که معنی آن "هر نوع از داده دودویی" است -- یک `ArrayBuffer` یا یک view روی آن.
270+
271+
در اینجا یک چیت‌شیت(برگه تقلب) داریم:
271272
![](arraybuffer-view-buffersource.svg)

0 commit comments

Comments
 (0)