# Extracting pairs of bytes from byte array

**URL:** https://forum.kirupa.com/t/extracting-pairs-of-bytes-from-byte-array/252267
**Category:** Uncategorized
**Created:** [February 18, 2008, 4:00pm UTC](https://forum.kirupa.com/t/extracting-pairs-of-bytes-from-byte-array/252267 "2008-02-18T16:00:46Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![dubbeat](https://avatars.discourse-cdn.com/v4/letter/d/839c29/32.png) [@dubbeat](https://forum.kirupa.com/u/dubbeat)
#### Post date: [February 18, 2008, 4:00pm UTC](https://forum.kirupa.com/t/extracting-pairs-of-bytes-from-byte-array/252267/1 "2008-02-18T16:00:46Z")

</div>

Hi,

I have a byte array that hold data containing information about a wav file.

There are 424644 bytes all together, 424600 of them being the actual wav…first 44 are the header.

The wav I’m working with is in 16 bit so Im trying to find a way to loop through the byte array and extract every pairs of bytes (because every 2 bytes will be one of my samples.) from byte 44 to 424600. I would then say want to print each value of the “pair” of bytes?

Im not really too sure how to go about,

Any insights at all?
