1#if 0 2level 1 3 44 delete middle block nopad 51 delete middle block pad 61 delete last block nopad 71 delete last block pad 81 insert middle block nopad 91 insert middle block equalpad 101 insert middle block smallpad 111 insert middle block smallpad+1 121 insert middle block biggerpad 131 insert last block X 141 set middle block smaller nopad 151 set middle block smaller pad 161 set last block smaller nopad 171 set last block smaller pad 181 set middle block bigger nopad 191 set middle block bigger equalpad 201 set middle block bigger smallpad 211 set middle block bigger smallpad+1 221 set middle block bigger biggerpad 231 set last block bigger nopad 241 set middle block equal X 252 set last block equal X 26 27level 2 28 29FLAC__bool FLAC__metadata_chain_write() 30 311 newsize==oldsize 32 newsize>oldsize 33b no use_padding 34c use_padding, last block is not padding 35g use_padding, last block is padding of insufficient length 36h use_padding, last block is padding, but padding header straddles border (can't do it) 37j use_padding, last block is padding of exact sufficient length (padding totally consumed) 38i use_padding, last block is padding of abundant length (padding is reduced) 39 newsize<oldsize 40a no use_padding 41d use_padding, last block is not padding, delta is < 4 42e use_padding, last block is not padding, delta is >= 4 43f use_padding, last block is padding 44 45void FLAC__metadata_chain_merge_padding(FLAC__Metadata_Chain *chain); 46void FLAC__metadata_chain_sort_padding(FLAC__Metadata_Chain *chain); 47 48S:34 A:1234 49a:shrink A->30 write nopad 50S:34 A:30 51b:grow A->32 write nopad 52S:34 A:32 53c:grow A->40 write pad 54S:34 A:40 55d:shrink A->37 write pad 56S:34 A:37 57e:shrink A->33 write pad 58S:34 A:33 P:0 59f:shrink A->20 write pad 60S:34 A:20 P:13 61g:grow A->40 write pad 62S:34 A:40 P:13 63h:grow A->54 write pad 64S:34 A:54 P:13 65i:grow A->60 write pad 66S:34 A:60 P:7 67j:grow A->71 write pad 68S:34 A:71 69#endif 70