Marvell Technology interview question

How to copy select bits from a bytstream or an incoming packet buffer