<p>In this episode, we look at 2 functions to encode and decode a bitmask for a set of configuration flags. This is a great way to efficiently store user or app settings. As always, the code for this snippet can be found here:</p>
<p><a href="https://codepen.io/walpolea/pen/WNNwaBq?editors=0012">https://codepen.io/walpolea/pen/WNNwaBq?editors=0012</a></p>

Code Snippet

Andrew Walpole

Using Bitmasks for Efficient App Configurations

OCT 16, 201921 MIN
Code Snippet

Using Bitmasks for Efficient App Configurations

OCT 16, 201921 MIN

Description

<p>In this episode, we look at 2 functions to encode and decode a bitmask for a set of configuration flags. This is a great way to efficiently store user or app settings. As always, the code for this snippet can be found here:</p> <p><a href="https://codepen.io/walpolea/pen/WNNwaBq?editors=0012">https://codepen.io/walpolea/pen/WNNwaBq?editors=0012</a></p>