<block>
  <name>Repack Bits</name>
  <key>blocks_repack_bits_bb</key>
  <import>from gnuradio import blocks</import>
  <make>blocks.repack_bits_bb($k, $l, $len_tag_key, $align_output, $endianness)</make>
  <callback>set_k_and_l($k,$l)</callback>
  <param>
    <name>Bits per input byte</name>
    <key>k</key>
    <value>1</value>
    <type>int</type>
  </param>

  <param>
    <name>Bits per output byte</name>
    <key>l</key>
    <value>8</value>
    <type>int</type>
  </param>

  <param>
    <name>Length Tag Key</name>
    <key>len_tag_key</key>
    <value>""</value>
    <type>string</type>
    <hide>part</hide>
  </param>

  <param>
    <name>Packet Alignment</name>
    <key>align_output</key>
    <value>False</value>
    <type>enum</type>
    <hide>part</hide>
    <option>
        <name>Output</name>
        <key>True</key>
    </option>
    <option>
        <name>Input</name>
        <key>False</key>
    </option>
  </param>

  <param>
    <name>Endianness</name>
    <key>endianness</key>
    <value>gr.GR_LSB_FIRST</value>
    <type>int</type>
    <hide>part</hide>
    <option>
      <name>MSB</name>
      <key>gr.GR_MSB_FIRST</key>
    </option>
    <option>
      <name>LSB</name>
      <key>gr.GR_LSB_FIRST</key>
    </option>
  </param>

  <sink>
    <name>in</name>
    <type>byte</type>
  </sink>

  <source>
    <name>out</name>
    <type>byte</type>
  </source>
</block>
